[TG3]: Set minimal hw interrupt mitigation.
[linux-2.6/verdex.git] / arch / arm / mach-pxa / poodle.c
blobb6c746ea38305b7f05537a9d3ac59742e6ae8bdf
1 /*
2 * linux/arch/arm/mach-pxa/poodle.c
4 * Support for the SHARP Poodle Board.
6 * Based on:
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.
13 * Change Log
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>
20 #include <linux/fb.h>
22 #include <asm/hardware.h>
23 #include <asm/mach-types.h>
24 #include <asm/irq.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>
40 #include "generic.h"
42 static struct resource poodle_scoop_resources[] = {
43 [0] = {
44 .start = 0x10800000,
45 .end = 0x10800fff,
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",
57 .id = -1,
58 .dev = {
59 .platform_data = &poodle_scoop_setup,
61 .num_resources = ARRAY_SIZE(poodle_scoop_resources),
62 .resource = poodle_scoop_resources,
66 /* LoCoMo device */
67 static struct resource locomo_resources[] = {
68 [0] = {
69 .start = 0x10000000,
70 .end = 0x10001fff,
71 .flags = IORESOURCE_MEM,
73 [1] = {
74 .start = IRQ_GPIO(10),
75 .end = IRQ_GPIO(10),
76 .flags = IORESOURCE_IRQ,
80 static struct platform_device locomo_device = {
81 .name = "locomo",
82 .id = 0,
83 .num_resources = ARRAY_SIZE(locomo_resources),
84 .resource = locomo_resources,
87 /* PXAFB device */
88 static struct pxafb_mach_info poodle_fb_info __initdata = {
89 .pixclock = 144700,
91 .xres = 320,
92 .yres = 240,
93 .bpp = 16,
95 .hsync_len = 7,
96 .left_margin = 11,
97 .right_margin = 30,
99 .vsync_len = 2,
100 .upper_margin = 2,
101 .lower_margin = 0,
102 .sync = FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT,
104 .lccr0 = LCCR0_Act | LCCR0_Sngl | LCCR0_Color,
105 .lccr3 = 0,
107 .pxafb_backlight_power = NULL,
108 .pxafb_lcd_power = NULL,
111 static struct platform_device *devices[] __initdata = {
112 &locomo_device,
113 &poodle_scoop_device,
116 static void __init poodle_init(void)
118 int ret = 0;
120 /* cpu initialize */
121 /* Pgsr Register */
122 PGSR0 = 0x0146dd80;
123 PGSR1 = 0x03bf0890;
124 PGSR2 = 0x0001c000;
126 /* Alternate Register */
127 GAFR0_L = 0x01001000;
128 GAFR0_U = 0x591a8010;
129 GAFR1_L = 0x900a8451;
130 GAFR1_U = 0xaaa5aaaa;
131 GAFR2_L = 0x8aaaaaaa;
132 GAFR2_U = 0x00000002;
134 /* Direction Register */
135 GPDR0 = 0xd3f0904c;
136 GPDR1 = 0xfcffb7d3;
137 GPDR2 = 0x0001ffff;
139 /* Output Register */
140 GPCR0 = 0x00000000;
141 GPCR1 = 0x00000000;
142 GPCR2 = 0x00000000;
144 GPSR0 = 0x00400000;
145 GPSR1 = 0x00000000;
146 GPSR2 = 0x00000000;
148 set_pxa_fb_info(&poodle_fb_info);
150 ret = platform_add_devices(devices, ARRAY_SIZE(devices));
151 if (ret) {
152 printk(KERN_WARNING "poodle: Unable to register LoCoMo device\n");
156 static void __init fixup_poodle(struct machine_desc *desc,
157 struct tag *tags, char **cmdline, struct meminfo *mi)
159 sharpsl_save_param();
162 static struct map_desc poodle_io_desc[] __initdata = {
163 /* virtual physical length */
164 { 0xef800000, 0x00000000, 0x00800000, MT_DEVICE }, /* Boot Flash */
167 static void __init poodle_map_io(void)
169 pxa_map_io();
170 iotable_init(poodle_io_desc, ARRAY_SIZE(poodle_io_desc));
172 /* setup sleep mode values */
173 PWER = 0x00000002;
174 PFER = 0x00000000;
175 PRER = 0x00000002;
176 PGSR0 = 0x00008000;
177 PGSR1 = 0x003F0202;
178 PGSR2 = 0x0001C000;
179 PCFR |= PCFR_OPDE;
182 MACHINE_START(POODLE, "SHARP Poodle")
183 BOOT_MEM(0xa0000000, 0x40000000, io_p2v(0x40000000))
184 FIXUP(fixup_poodle)
185 MAPIO(poodle_map_io)
186 INITIRQ(pxa_init_irq)
187 .timer = &pxa_timer,
188 .init_machine = poodle_init,
189 MACHINE_END