2 * Support for Sharp SL-C6000x PDAs
5 * Copyright (c) 2005 Dirk Opfer
7 * Based on code written by Sharp/Lineo for 2.4 kernels
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License version 2 as
11 * published by the Free Software Foundation.
15 #include <linux/kernel.h>
16 #include <linux/init.h>
17 #include <linux/device.h>
18 #include <linux/major.h>
20 #include <linux/interrupt.h>
21 #include <linux/mmc/host.h>
23 #include <asm/setup.h>
24 #include <asm/memory.h>
25 #include <asm/mach-types.h>
26 #include <asm/hardware.h>
28 #include <asm/arch/irda.h>
29 #include <asm/arch/mmc.h>
30 #include <asm/arch/udc.h>
32 #include <asm/mach/arch.h>
33 #include <asm/mach/map.h>
34 #include <asm/mach/irq.h>
36 #include <asm/arch/pxa-regs.h>
37 #include <asm/arch/irq.h>
38 #include <asm/arch/tosa.h>
40 #include <asm/hardware/scoop.h>
41 #include <asm/mach/sharpsl_param.h>
49 static struct resource tosa_scoop_resources[] = {
51 .start = TOSA_CF_PHYS,
52 .end = TOSA_CF_PHYS + 0xfff,
53 .flags = IORESOURCE_MEM,
57 static struct scoop_config tosa_scoop_setup = {
58 .io_dir = TOSA_SCOOP_IO_DIR,
59 .io_out = TOSA_SCOOP_IO_OUT,
63 struct platform_device tosascoop_device = {
64 .name = "sharp-scoop",
67 .platform_data = &tosa_scoop_setup,
69 .num_resources = ARRAY_SIZE(tosa_scoop_resources),
70 .resource = tosa_scoop_resources,
77 static struct resource tosa_scoop_jc_resources[] = {
79 .start = TOSA_SCOOP_PHYS + 0x40,
80 .end = TOSA_SCOOP_PHYS + 0xfff,
81 .flags = IORESOURCE_MEM,
85 static struct scoop_config tosa_scoop_jc_setup = {
86 .io_dir = TOSA_SCOOP_JC_IO_DIR,
87 .io_out = TOSA_SCOOP_JC_IO_OUT,
90 struct platform_device tosascoop_jc_device = {
91 .name = "sharp-scoop",
94 .platform_data = &tosa_scoop_jc_setup,
95 .parent = &tosascoop_device.dev,
97 .num_resources = ARRAY_SIZE(tosa_scoop_jc_resources),
98 .resource = tosa_scoop_jc_resources,
101 static struct scoop_pcmcia_dev tosa_pcmcia_scoop[] = {
103 .dev = &tosascoop_device.dev,
104 .irq = TOSA_IRQ_GPIO_CF_IRQ,
105 .cd_irq = TOSA_IRQ_GPIO_CF_CD,
106 .cd_irq_str = "PCMCIA0 CD",
108 .dev = &tosascoop_jc_device.dev,
109 .irq = TOSA_IRQ_GPIO_JC_CF_IRQ,
115 static struct platform_device *devices[] __initdata = {
117 &tosascoop_jc_device,
120 static void __init tosa_init(void)
122 pxa_gpio_mode(TOSA_GPIO_ON_RESET | GPIO_IN);
123 pxa_gpio_mode(TOSA_GPIO_TC6393_INT | GPIO_IN);
125 /* setup sleep mode values */
137 platform_add_devices(devices, ARRAY_SIZE(devices));
140 scoop_devs = &tosa_pcmcia_scoop[0];
143 static void __init fixup_tosa(struct machine_desc *desc,
144 struct tag *tags, char **cmdline, struct meminfo *mi)
146 sharpsl_save_param();
148 mi->bank[0].start = 0xa0000000;
149 mi->bank[0].node = 0;
150 mi->bank[0].size = (64*1024*1024);
153 MACHINE_START(TOSA, "SHARP Tosa")
154 .phys_ram = 0xa0000000,
155 .phys_io = 0x40000000,
156 .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc,
158 .map_io = pxa_map_io,
159 .init_irq = pxa_init_irq,
160 .init_machine = tosa_init,