diff options
author | Russell King <rmk@dyn-67.arm.linux.org.uk> | 2009-07-05 22:41:31 +0100 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2009-07-06 17:00:43 +0100 |
commit | eb7fffa39a3f114832df54a3e373d7580d8fe757 (patch) | |
tree | 47d4b5986e8d85433abc99e8bc02572cc970c357 /arch/arm/mach-realview/realview_pbx.c | |
parent | bbeddc43e673fb6882cc55efdc3c3002c14f5d08 (diff) | |
download | blackbird-op-linux-eb7fffa39a3f114832df54a3e373d7580d8fe757.tar.gz blackbird-op-linux-eb7fffa39a3f114832df54a3e373d7580d8fe757.zip |
[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_pbx.c')
-rw-r--r-- | arch/arm/mach-realview/realview_pbx.c | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/arch/arm/mach-realview/realview_pbx.c b/arch/arm/mach-realview/realview_pbx.c index ede2a57240a3..ce6c5d25fbef 100644 --- a/arch/arm/mach-realview/realview_pbx.c +++ b/arch/arm/mach-realview/realview_pbx.c @@ -22,6 +22,7 @@ #include <linux/platform_device.h> #include <linux/sysdev.h> #include <linux/amba/bus.h> +#include <linux/amba/pl061.h> #include <linux/io.h> #include <asm/irq.h> @@ -118,6 +119,21 @@ static void __init realview_pbx_map_io(void) iotable_init(realview_local_io_desc, ARRAY_SIZE(realview_local_io_desc)); } +static struct pl061_platform_data gpio0_plat_data = { + .gpio_base = 0, + .irq_base = -1, +}; + +static struct pl061_platform_data gpio1_plat_data = { + .gpio_base = 8, + .irq_base = -1, +}; + +static struct pl061_platform_data gpio2_plat_data = { + .gpio_base = 16, + .irq_base = -1, +}; + /* * RealView PBXCore AMBA devices */ @@ -176,9 +192,9 @@ AMBA_DEVICE(uart3, "fpga:09", PBX_UART3, NULL); AMBA_DEVICE(smc, "dev:00", PBX_SMC, NULL); AMBA_DEVICE(sctl, "dev:e0", SCTL, NULL); AMBA_DEVICE(wdog, "dev:e1", PBX_WATCHDOG, NULL); -AMBA_DEVICE(gpio0, "dev:e4", PBX_GPIO0, NULL); -AMBA_DEVICE(gpio1, "dev:e5", GPIO1, NULL); -AMBA_DEVICE(gpio2, "dev:e6", GPIO2, NULL); +AMBA_DEVICE(gpio0, "dev:e4", PBX_GPIO0, &gpio0_plat_data); +AMBA_DEVICE(gpio1, "dev:e5", GPIO1, &gpio1_plat_data); +AMBA_DEVICE(gpio2, "dev:e6", GPIO2, &gpio2_plat_data); AMBA_DEVICE(rtc, "dev:e8", PBX_RTC, NULL); AMBA_DEVICE(sci0, "dev:f0", SCI, NULL); AMBA_DEVICE(uart0, "dev:f1", PBX_UART0, NULL); |