diff options
author | Russell King <rmk@dyn-67.arm.linux.org.uk> | 2009-07-05 17:41:31 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2009-07-06 12:00:43 -0400 |
commit | eb7fffa39a3f114832df54a3e373d7580d8fe757 (patch) | |
tree | 47d4b5986e8d85433abc99e8bc02572cc970c357 /arch/arm/mach-realview/realview_pba8.c | |
parent | bbeddc43e673fb6882cc55efdc3c3002c14f5d08 (diff) |
[ARM] realview: add PL061 gpiolib support
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mach-realview/realview_pba8.c')
-rw-r--r-- | arch/arm/mach-realview/realview_pba8.c | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/arch/arm/mach-realview/realview_pba8.c b/arch/arm/mach-realview/realview_pba8.c index d6ac1eb86576..70bba9900d97 100644 --- a/arch/arm/mach-realview/realview_pba8.c +++ b/arch/arm/mach-realview/realview_pba8.c | |||
@@ -23,6 +23,7 @@ | |||
23 | #include <linux/platform_device.h> | 23 | #include <linux/platform_device.h> |
24 | #include <linux/sysdev.h> | 24 | #include <linux/sysdev.h> |
25 | #include <linux/amba/bus.h> | 25 | #include <linux/amba/bus.h> |
26 | #include <linux/amba/pl061.h> | ||
26 | #include <linux/io.h> | 27 | #include <linux/io.h> |
27 | 28 | ||
28 | #include <asm/irq.h> | 29 | #include <asm/irq.h> |
@@ -98,6 +99,21 @@ static void __init realview_pba8_map_io(void) | |||
98 | iotable_init(realview_pba8_io_desc, ARRAY_SIZE(realview_pba8_io_desc)); | 99 | iotable_init(realview_pba8_io_desc, ARRAY_SIZE(realview_pba8_io_desc)); |
99 | } | 100 | } |
100 | 101 | ||
102 | static struct pl061_platform_data gpio0_plat_data = { | ||
103 | .gpio_base = 0, | ||
104 | .irq_base = -1, | ||
105 | }; | ||
106 | |||
107 | static struct pl061_platform_data gpio1_plat_data = { | ||
108 | .gpio_base = 8, | ||
109 | .irq_base = -1, | ||
110 | }; | ||
111 | |||
112 | static struct pl061_platform_data gpio2_plat_data = { | ||
113 | .gpio_base = 16, | ||
114 | .irq_base = -1, | ||
115 | }; | ||
116 | |||
101 | /* | 117 | /* |
102 | * RealView PBA8Core AMBA devices | 118 | * RealView PBA8Core AMBA devices |
103 | */ | 119 | */ |
@@ -156,9 +172,9 @@ AMBA_DEVICE(uart3, "fpga:09", PBA8_UART3, NULL); | |||
156 | AMBA_DEVICE(smc, "dev:00", PBA8_SMC, NULL); | 172 | AMBA_DEVICE(smc, "dev:00", PBA8_SMC, NULL); |
157 | AMBA_DEVICE(sctl, "dev:e0", SCTL, NULL); | 173 | AMBA_DEVICE(sctl, "dev:e0", SCTL, NULL); |
158 | AMBA_DEVICE(wdog, "dev:e1", PBA8_WATCHDOG, NULL); | 174 | AMBA_DEVICE(wdog, "dev:e1", PBA8_WATCHDOG, NULL); |
159 | AMBA_DEVICE(gpio0, "dev:e4", PBA8_GPIO0, NULL); | 175 | AMBA_DEVICE(gpio0, "dev:e4", PBA8_GPIO0, &gpio0_plat_data); |
160 | AMBA_DEVICE(gpio1, "dev:e5", GPIO1, NULL); | 176 | AMBA_DEVICE(gpio1, "dev:e5", GPIO1, &gpio1_plat_data); |
161 | AMBA_DEVICE(gpio2, "dev:e6", GPIO2, NULL); | 177 | AMBA_DEVICE(gpio2, "dev:e6", GPIO2, &gpio2_plat_data); |
162 | AMBA_DEVICE(rtc, "dev:e8", PBA8_RTC, NULL); | 178 | AMBA_DEVICE(rtc, "dev:e8", PBA8_RTC, NULL); |
163 | AMBA_DEVICE(sci0, "dev:f0", SCI, NULL); | 179 | AMBA_DEVICE(sci0, "dev:f0", SCI, NULL); |
164 | AMBA_DEVICE(uart0, "dev:f1", PBA8_UART0, NULL); | 180 | AMBA_DEVICE(uart0, "dev:f1", PBA8_UART0, NULL); |