diff options
Diffstat (limited to 'arch/arm/mach-mmp/mmp2.c')
-rw-r--r-- | arch/arm/mach-mmp/mmp2.c | 28 |
1 files changed, 19 insertions, 9 deletions
diff --git a/arch/arm/mach-mmp/mmp2.c b/arch/arm/mach-mmp/mmp2.c index 5dd1d4a6aeb9..1ed222d3e22b 100644 --- a/arch/arm/mach-mmp/mmp2.c +++ b/arch/arm/mach-mmp/mmp2.c | |||
@@ -13,6 +13,7 @@ | |||
13 | #include <linux/kernel.h> | 13 | #include <linux/kernel.h> |
14 | #include <linux/init.h> | 14 | #include <linux/init.h> |
15 | #include <linux/io.h> | 15 | #include <linux/io.h> |
16 | #include <linux/platform_device.h> | ||
16 | 17 | ||
17 | #include <asm/hardware/cache-tauros2.h> | 18 | #include <asm/hardware/cache-tauros2.h> |
18 | 19 | ||
@@ -24,7 +25,6 @@ | |||
24 | #include <mach/irqs.h> | 25 | #include <mach/irqs.h> |
25 | #include <mach/dma.h> | 26 | #include <mach/dma.h> |
26 | #include <mach/mfp.h> | 27 | #include <mach/mfp.h> |
27 | #include <mach/gpio-pxa.h> | ||
28 | #include <mach/devices.h> | 28 | #include <mach/devices.h> |
29 | #include <mach/mmp2.h> | 29 | #include <mach/mmp2.h> |
30 | 30 | ||
@@ -33,8 +33,6 @@ | |||
33 | 33 | ||
34 | #define MFPR_VIRT_BASE (APB_VIRT_BASE + 0x1e000) | 34 | #define MFPR_VIRT_BASE (APB_VIRT_BASE + 0x1e000) |
35 | 35 | ||
36 | #define APMASK(i) (GPIO_REGS_VIRT + BANK_OFF(i) + 0x9c) | ||
37 | |||
38 | static struct mfp_addr_map mmp2_addr_map[] __initdata = { | 36 | static struct mfp_addr_map mmp2_addr_map[] __initdata = { |
39 | 37 | ||
40 | MFP_ADDR_X(GPIO0, GPIO58, 0x54), | 38 | MFP_ADDR_X(GPIO0, GPIO58, 0x54), |
@@ -101,12 +99,6 @@ static void __init mmp2_init_gpio(void) | |||
101 | 99 | ||
102 | /* enable GPIO clock */ | 100 | /* enable GPIO clock */ |
103 | __raw_writel(APBC_APBCLK | APBC_FNCLK, APBC_MMP2_GPIO); | 101 | __raw_writel(APBC_APBCLK | APBC_FNCLK, APBC_MMP2_GPIO); |
104 | |||
105 | /* unmask GPIO edge detection for all 6 banks -- APMASKx */ | ||
106 | for (i = 0; i < 6; i++) | ||
107 | __raw_writel(0xffffffff, APMASK(i)); | ||
108 | |||
109 | pxa_init_gpio(IRQ_MMP2_GPIO, 0, 167, NULL); | ||
110 | } | 102 | } |
111 | 103 | ||
112 | void __init mmp2_init_irq(void) | 104 | void __init mmp2_init_irq(void) |
@@ -230,3 +222,21 @@ MMP2_DEVICE(asram, "asram", -1, NONE, 0xe0000000, 0x4000); | |||
230 | /* 0xd1000000 ~ 0xd101ffff is reserved for secure processor */ | 222 | /* 0xd1000000 ~ 0xd101ffff is reserved for secure processor */ |
231 | MMP2_DEVICE(isram, "isram", -1, NONE, 0xd1020000, 0x18000); | 223 | MMP2_DEVICE(isram, "isram", -1, NONE, 0xd1020000, 0x18000); |
232 | 224 | ||
225 | struct resource mmp2_resource_gpio[] = { | ||
226 | { | ||
227 | .start = 0xd4019000, | ||
228 | .end = 0xd4019fff, | ||
229 | .flags = IORESOURCE_MEM, | ||
230 | }, { | ||
231 | .start = IRQ_MMP2_GPIO, | ||
232 | .end = IRQ_MMP2_GPIO, | ||
233 | .flags = IORESOURCE_IRQ, | ||
234 | }, | ||
235 | }; | ||
236 | |||
237 | struct platform_device mmp2_device_gpio = { | ||
238 | .name = "pxa-gpio", | ||
239 | .id = -1, | ||
240 | .num_resources = ARRAY_SIZE(mmp2_resource_gpio), | ||
241 | .resource = mmp2_resource_gpio, | ||
242 | }; | ||