diff options
Diffstat (limited to 'arch/arm/mach-mmp/pxa168.c')
-rw-r--r-- | arch/arm/mach-mmp/pxa168.c | 29 |
1 files changed, 20 insertions, 9 deletions
diff --git a/arch/arm/mach-mmp/pxa168.c b/arch/arm/mach-mmp/pxa168.c index 76ca15c00e45..fefdfe59c07c 100644 --- a/arch/arm/mach-mmp/pxa168.c +++ b/arch/arm/mach-mmp/pxa168.c | |||
@@ -13,6 +13,7 @@ | |||
13 | #include <linux/list.h> | 13 | #include <linux/list.h> |
14 | #include <linux/io.h> | 14 | #include <linux/io.h> |
15 | #include <linux/clk.h> | 15 | #include <linux/clk.h> |
16 | #include <linux/platform_device.h> | ||
16 | 17 | ||
17 | #include <asm/mach/time.h> | 18 | #include <asm/mach/time.h> |
18 | #include <mach/addr-map.h> | 19 | #include <mach/addr-map.h> |
@@ -20,7 +21,6 @@ | |||
20 | #include <mach/regs-apbc.h> | 21 | #include <mach/regs-apbc.h> |
21 | #include <mach/regs-apmu.h> | 22 | #include <mach/regs-apmu.h> |
22 | #include <mach/irqs.h> | 23 | #include <mach/irqs.h> |
23 | #include <mach/gpio-pxa.h> | ||
24 | #include <mach/dma.h> | 24 | #include <mach/dma.h> |
25 | #include <mach/devices.h> | 25 | #include <mach/devices.h> |
26 | #include <mach/mfp.h> | 26 | #include <mach/mfp.h> |
@@ -43,20 +43,12 @@ static struct mfp_addr_map pxa168_mfp_addr_map[] __initdata = | |||
43 | MFP_ADDR_END, | 43 | MFP_ADDR_END, |
44 | }; | 44 | }; |
45 | 45 | ||
46 | #define APMASK(i) (GPIO_REGS_VIRT + BANK_OFF(i) + 0x09c) | ||
47 | |||
48 | static void __init pxa168_init_gpio(void) | 46 | static void __init pxa168_init_gpio(void) |
49 | { | 47 | { |
50 | int i; | 48 | int i; |
51 | 49 | ||
52 | /* enable GPIO clock */ | 50 | /* enable GPIO clock */ |
53 | __raw_writel(APBC_APBCLK | APBC_FNCLK, APBC_PXA168_GPIO); | 51 | __raw_writel(APBC_APBCLK | APBC_FNCLK, APBC_PXA168_GPIO); |
54 | |||
55 | /* unmask GPIO edge detection for all 4 banks - APMASKx */ | ||
56 | for (i = 0; i < 4; i++) | ||
57 | __raw_writel(0xffffffff, APMASK(i)); | ||
58 | |||
59 | pxa_init_gpio(IRQ_PXA168_GPIOX, 0, 127, NULL); | ||
60 | } | 52 | } |
61 | 53 | ||
62 | void __init pxa168_init_irq(void) | 54 | void __init pxa168_init_irq(void) |
@@ -174,6 +166,25 @@ PXA168_DEVICE(fb, "pxa168-fb", -1, LCD, 0xd420b000, 0x1c8); | |||
174 | PXA168_DEVICE(keypad, "pxa27x-keypad", -1, KEYPAD, 0xd4012000, 0x4c); | 166 | PXA168_DEVICE(keypad, "pxa27x-keypad", -1, KEYPAD, 0xd4012000, 0x4c); |
175 | PXA168_DEVICE(eth, "pxa168-eth", -1, MFU, 0xc0800000, 0x0fff); | 167 | PXA168_DEVICE(eth, "pxa168-eth", -1, MFU, 0xc0800000, 0x0fff); |
176 | 168 | ||
169 | struct resource pxa168_resource_gpio[] = { | ||
170 | { | ||
171 | .start = 0xd4019000, | ||
172 | .end = 0xd4019fff, | ||
173 | .flags = IORESOURCE_MEM, | ||
174 | }, { | ||
175 | .start = IRQ_PXA168_GPIOX, | ||
176 | .end = IRQ_PXA168_GPIOX, | ||
177 | .flags = IORESOURCE_IRQ, | ||
178 | }, | ||
179 | }; | ||
180 | |||
181 | struct platform_device pxa168_device_gpio = { | ||
182 | .name = "pxa-gpio", | ||
183 | .id = -1, | ||
184 | .num_resources = ARRAY_SIZE(pxa168_resource_gpio), | ||
185 | .resource = pxa168_resource_gpio, | ||
186 | }; | ||
187 | |||
177 | struct resource pxa168_usb_host_resources[] = { | 188 | struct resource pxa168_usb_host_resources[] = { |
178 | /* USB Host conroller register base */ | 189 | /* USB Host conroller register base */ |
179 | [0] = { | 190 | [0] = { |