2 * linux/arch/arm/mach-pxa/poodle.c
4 * Support for the SHARP Poodle Board.
7 * linux/arch/arm/mach-pxa/lubbock.c Author: Nicolas Pitre
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.
14 * 12-Dec-2002 Sharp Corporation for Poodle
15 * John Lenz <lenz@cs.wisc.edu> updates to 2.6
17 #include <linux/kernel.h>
18 #include <linux/init.h>
19 #include <linux/device.h>
22 #include <asm/hardware.h>
23 #include <asm/mach-types.h>
25 #include <asm/setup.h>
27 #include <asm/mach/arch.h>
28 #include <asm/mach/map.h>
29 #include <asm/mach/irq.h>
31 #include <asm/arch/pxa-regs.h>
32 #include <asm/arch/irq.h>
33 #include <asm/arch/poodle.h>
34 #include <asm/arch/pxafb.h>
36 #include <asm/hardware/scoop.h>
37 #include <asm/hardware/locomo.h>
38 #include <asm/mach/sharpsl_param.h>
42 static struct resource poodle_scoop_resources
[] = {
46 .flags
= IORESOURCE_MEM
,
50 static struct scoop_config poodle_scoop_setup
= {
51 .io_dir
= POODLE_SCOOP_IO_DIR
,
52 .io_out
= POODLE_SCOOP_IO_OUT
,
55 struct platform_device poodle_scoop_device
= {
56 .name
= "sharp-scoop",
59 .platform_data
= &poodle_scoop_setup
,
61 .num_resources
= ARRAY_SIZE(poodle_scoop_resources
),
62 .resource
= poodle_scoop_resources
,
65 static struct scoop_pcmcia_dev poodle_pcmcia_scoop
[] = {
67 .dev
= &poodle_scoop_device
.dev
,
68 .irq
= POODLE_IRQ_GPIO_CF_IRQ
,
69 .cd_irq
= POODLE_IRQ_GPIO_CF_CD
,
70 .cd_irq_str
= "PCMCIA0 CD",
76 static struct resource locomo_resources
[] = {
80 .flags
= IORESOURCE_MEM
,
83 .start
= IRQ_GPIO(10),
85 .flags
= IORESOURCE_IRQ
,
89 static struct platform_device locomo_device
= {
92 .num_resources
= ARRAY_SIZE(locomo_resources
),
93 .resource
= locomo_resources
,
97 static struct pxafb_mach_info poodle_fb_info __initdata
= {
111 .sync
= FB_SYNC_HOR_HIGH_ACT
| FB_SYNC_VERT_HIGH_ACT
,
113 .lccr0
= LCCR0_Act
| LCCR0_Sngl
| LCCR0_Color
,
116 .pxafb_backlight_power
= NULL
,
117 .pxafb_lcd_power
= NULL
,
120 static struct platform_device
*devices
[] __initdata
= {
122 &poodle_scoop_device
,
125 static void __init
poodle_init(void)
135 /* Alternate Register */
136 GAFR0_L
= 0x01001000;
137 GAFR0_U
= 0x591a8010;
138 GAFR1_L
= 0x900a8451;
139 GAFR1_U
= 0xaaa5aaaa;
140 GAFR2_L
= 0x8aaaaaaa;
141 GAFR2_U
= 0x00000002;
143 /* Direction Register */
148 /* Output Register */
157 set_pxa_fb_info(&poodle_fb_info
);
160 scoop_devs
= &poodle_pcmcia_scoop
[0];
162 ret
= platform_add_devices(devices
, ARRAY_SIZE(devices
));
164 printk(KERN_WARNING
"poodle: Unable to register LoCoMo device\n");
168 static void __init
fixup_poodle(struct machine_desc
*desc
,
169 struct tag
*tags
, char **cmdline
, struct meminfo
*mi
)
171 sharpsl_save_param();
174 static struct map_desc poodle_io_desc
[] __initdata
= {
175 /* virtual physical length */
176 { 0xef800000, 0x00000000, 0x00800000, MT_DEVICE
}, /* Boot Flash */
179 static void __init
poodle_map_io(void)
182 iotable_init(poodle_io_desc
, ARRAY_SIZE(poodle_io_desc
));
184 /* setup sleep mode values */
194 MACHINE_START(POODLE
, "SHARP Poodle")
195 .phys_ram
= 0xa0000000,
196 .phys_io
= 0x40000000,
197 .io_pg_offst
= (io_p2v(0x40000000) >> 18) & 0xfffc,
198 .fixup
= fixup_poodle
,
199 .map_io
= poodle_map_io
,
200 .init_irq
= pxa_init_irq
,
202 .init_machine
= poodle_init
,