From 780febd5b709fd9db80830ea656de96bbe3e5001 Mon Sep 17 00:00:00 2001 From: Russell King Date: Wed, 31 Aug 2016 08:49:47 +0100 Subject: ARM: sa1100/cerf: convert to generic CF sockets Convert Cerf to use the generic CF socket support. Signed-off-by: Russell King --- arch/arm/mach-sa1100/cerf.c | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) (limited to 'arch/arm/mach-sa1100') diff --git a/arch/arm/mach-sa1100/cerf.c b/arch/arm/mach-sa1100/cerf.c index 2d25ececb415..b2a4b41626ef 100644 --- a/arch/arm/mach-sa1100/cerf.c +++ b/arch/arm/mach-sa1100/cerf.c @@ -11,6 +11,7 @@ */ #include +#include #include #include #include @@ -45,6 +46,19 @@ static struct platform_device cerfuart2_device = { .resource = cerfuart2_resources, }; +/* Compact Flash */ +static struct gpiod_lookup_table cerf_cf_gpio_table = { + .dev_id = "sa11x0-pcmcia.1", + .table = { + GPIO_LOOKUP("gpio", 19, "bvd2", GPIO_ACTIVE_HIGH), + GPIO_LOOKUP("gpio", 20, "bvd1", GPIO_ACTIVE_HIGH), + GPIO_LOOKUP("gpio", 21, "reset", GPIO_ACTIVE_HIGH), + GPIO_LOOKUP("gpio", 22, "ready", GPIO_ACTIVE_HIGH), + GPIO_LOOKUP("gpio", 23, "detect", GPIO_ACTIVE_LOW), + { }, + }, +}; + /* LEDs */ struct gpio_led cerf_gpio_leds[] = { { @@ -151,9 +165,6 @@ static void __init cerf_map_io(void) sa1100_register_uart(0, 3); sa1100_register_uart(1, 2); /* disable this and the uart2 device for sa1100_fir */ sa1100_register_uart(2, 1); - - /* set some GPDR bits here while it's safe */ - GPDR |= CERF_GPIO_CF_RESET; } static struct mcp_plat_data cerf_mcp_data = { @@ -167,6 +178,7 @@ static void __init cerf_init(void) platform_add_devices(cerf_devices, ARRAY_SIZE(cerf_devices)); sa11x0_register_mtd(&cerf_flash_data, &cerf_flash_resource, 1); sa11x0_register_mcp(&cerf_mcp_data); + sa11x0_register_pcmcia(1, &cerf_cf_gpio_table); } MACHINE_START(CERF, "Intrinsyc CerfBoard/CerfCube") -- cgit v1.2.3-59-g8ed1b