aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-realview/realview_pb11mp.c
diff options
context:
space:
mode:
authorRussell King <rmk@dyn-67.arm.linux.org.uk>2009-07-05 17:41:31 -0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2009-07-06 12:00:43 -0400
commiteb7fffa39a3f114832df54a3e373d7580d8fe757 (patch)
tree47d4b5986e8d85433abc99e8bc02572cc970c357 /arch/arm/mach-realview/realview_pb11mp.c
parentbbeddc43e673fb6882cc55efdc3c3002c14f5d08 (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_pb11mp.c')
-rw-r--r--arch/arm/mach-realview/realview_pb11mp.c22
1 files changed, 19 insertions, 3 deletions
diff --git a/arch/arm/mach-realview/realview_pb11mp.c b/arch/arm/mach-realview/realview_pb11mp.c
index dc4b16943907..fdd042b85f40 100644
--- a/arch/arm/mach-realview/realview_pb11mp.c
+++ b/arch/arm/mach-realview/realview_pb11mp.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 <mach/hardware.h> 29#include <mach/hardware.h>
@@ -108,6 +109,21 @@ static void __init realview_pb11mp_map_io(void)
108 iotable_init(realview_pb11mp_io_desc, ARRAY_SIZE(realview_pb11mp_io_desc)); 109 iotable_init(realview_pb11mp_io_desc, ARRAY_SIZE(realview_pb11mp_io_desc));
109} 110}
110 111
112static struct pl061_platform_data gpio0_plat_data = {
113 .gpio_base = 0,
114 .irq_base = -1,
115};
116
117static struct pl061_platform_data gpio1_plat_data = {
118 .gpio_base = 8,
119 .irq_base = -1,
120};
121
122static struct pl061_platform_data gpio2_plat_data = {
123 .gpio_base = 16,
124 .irq_base = -1,
125};
126
111/* 127/*
112 * RealView PB11MPCore AMBA devices 128 * RealView PB11MPCore AMBA devices
113 */ 129 */
@@ -166,9 +182,9 @@ AMBA_DEVICE(uart3, "fpga:09", PB11MP_UART3, NULL);
166AMBA_DEVICE(smc, "dev:00", PB11MP_SMC, NULL); 182AMBA_DEVICE(smc, "dev:00", PB11MP_SMC, NULL);
167AMBA_DEVICE(sctl, "dev:e0", SCTL, NULL); 183AMBA_DEVICE(sctl, "dev:e0", SCTL, NULL);
168AMBA_DEVICE(wdog, "dev:e1", PB11MP_WATCHDOG, NULL); 184AMBA_DEVICE(wdog, "dev:e1", PB11MP_WATCHDOG, NULL);
169AMBA_DEVICE(gpio0, "dev:e4", PB11MP_GPIO0, NULL); 185AMBA_DEVICE(gpio0, "dev:e4", PB11MP_GPIO0, &gpio0_plat_data);
170AMBA_DEVICE(gpio1, "dev:e5", GPIO1, NULL); 186AMBA_DEVICE(gpio1, "dev:e5", GPIO1, &gpio1_plat_data);
171AMBA_DEVICE(gpio2, "dev:e6", GPIO2, NULL); 187AMBA_DEVICE(gpio2, "dev:e6", GPIO2, &gpio2_plat_data);
172AMBA_DEVICE(rtc, "dev:e8", PB11MP_RTC, NULL); 188AMBA_DEVICE(rtc, "dev:e8", PB11MP_RTC, NULL);
173AMBA_DEVICE(sci0, "dev:f0", SCI, NULL); 189AMBA_DEVICE(sci0, "dev:f0", SCI, NULL);
174AMBA_DEVICE(uart0, "dev:f1", PB11MP_UART0, NULL); 190AMBA_DEVICE(uart0, "dev:f1", PB11MP_UART0, NULL);