diff options
author | Russell King <rmk@dyn-67.arm.linux.org.uk> | 2009-07-05 22:43:01 +0100 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2009-07-06 12:02:14 +0100 |
commit | bbeddc43e673fb6882cc55efdc3c3002c14f5d08 (patch) | |
tree | 42fd2c211b4988eadc9c2c74dcf176f5c0832991 /arch/arm/mach-versatile/versatile_pb.c | |
parent | 28d0325ce6e0a52f53d8af687e6427fee59004d3 (diff) |
[ARM] versatile: add PL061 gpiolib support
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mach-versatile/versatile_pb.c')
-rw-r--r-- | arch/arm/mach-versatile/versatile_pb.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/arch/arm/mach-versatile/versatile_pb.c b/arch/arm/mach-versatile/versatile_pb.c index aa051c0884f8..7419451fdf00 100644 --- a/arch/arm/mach-versatile/versatile_pb.c +++ b/arch/arm/mach-versatile/versatile_pb.c @@ -23,6 +23,7 @@ #include <linux/device.h> #include <linux/sysdev.h> #include <linux/amba/bus.h> +#include <linux/amba/pl061.h> #include <linux/io.h> #include <mach/hardware.h> @@ -45,6 +46,16 @@ static struct mmc_platform_data mmc1_plat_data = { .status = mmc_status, }; +static struct pl061_platform_data gpio2_plat_data = { + .gpio_base = 16, + .irq_base = IRQ_GPIO2_START, +}; + +static struct pl061_platform_data gpio3_plat_data = { + .gpio_base = 24, + .irq_base = IRQ_GPIO3_START, +}; + #define UART3_IRQ { IRQ_SIC_UART3, NO_IRQ } #define UART3_DMA { 0x86, 0x87 } #define SCI1_IRQ { IRQ_SIC_SCI3, NO_IRQ } @@ -70,8 +81,8 @@ AMBA_DEVICE(sci1, "fpga:0a", SCI1, NULL); AMBA_DEVICE(mmc1, "fpga:0b", MMCI1, &mmc1_plat_data); /* DevChip Primecells */ -AMBA_DEVICE(gpio2, "dev:e6", GPIO2, NULL); -AMBA_DEVICE(gpio3, "dev:e7", GPIO3, NULL); +AMBA_DEVICE(gpio2, "dev:e6", GPIO2, &gpio2_plat_data); +AMBA_DEVICE(gpio3, "dev:e7", GPIO3, &gpio3_plat_data); static struct amba_device *amba_devs[] __initdata = { &uart3_device, |