From bbeddc43e673fb6882cc55efdc3c3002c14f5d08 Mon Sep 17 00:00:00 2001 From: Russell King Date: Sun, 5 Jul 2009 22:43:01 +0100 Subject: [ARM] versatile: add PL061 gpiolib support Signed-off-by: Russell King --- arch/arm/mach-versatile/versatile_pb.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'arch/arm/mach-versatile/versatile_pb.c') 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 #include #include +#include #include #include @@ -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, -- cgit v1.2.2 From 7fb2bbf4d9e7e62057184f1e061566459eef6c79 Mon Sep 17 00:00:00 2001 From: Russell King Date: Thu, 9 Jul 2009 15:15:12 +0100 Subject: MMC: MMCI: allow GPIOs to be passed Add and initialize the gpio_wp and gpio_cd members. We need to ensure that all users are covered, because GPIO 0 may be valid. Signed-off-by: Russell King Acked-by: Linus Walleij --- arch/arm/mach-versatile/versatile_pb.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'arch/arm/mach-versatile/versatile_pb.c') diff --git a/arch/arm/mach-versatile/versatile_pb.c b/arch/arm/mach-versatile/versatile_pb.c index 7419451fdf00..9af8d8154df5 100644 --- a/arch/arm/mach-versatile/versatile_pb.c +++ b/arch/arm/mach-versatile/versatile_pb.c @@ -44,6 +44,8 @@ static struct mmc_platform_data mmc1_plat_data = { .ocr_mask = MMC_VDD_32_33|MMC_VDD_33_34, .status = mmc_status, + .gpio_wp = -1, + .gpio_cd = -1, }; static struct pl061_platform_data gpio2_plat_data = { -- cgit v1.2.2