Skip to content

Commit

Permalink
ARM: sa1100/cerf: convert to generic CF sockets
Browse files Browse the repository at this point in the history
Convert Cerf to use the generic CF socket support.

Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
  • Loading branch information
Russell King committed Mar 24, 2018
1 parent 29786e9 commit 780febd
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 94 deletions.
18 changes: 15 additions & 3 deletions arch/arm/mach-sa1100/cerf.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
*/

#include <linux/init.h>
#include <linux/gpio/machine.h>
#include <linux/kernel.h>
#include <linux/tty.h>
#include <linux/platform_data/sa11x0-serial.h>
Expand Down Expand Up @@ -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[] = {
{
Expand Down Expand Up @@ -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 = {
Expand All @@ -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")
Expand Down
1 change: 0 additions & 1 deletion drivers/pcmcia/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ sa1111_cs-$(CONFIG_SA1100_JORNADA720) += sa1111_jornada720.o
sa1111_cs-$(CONFIG_ARCH_LUBBOCK) += sa1111_lubbock.o

sa1100_cs-y += sa1100_generic.o
sa1100_cs-$(CONFIG_SA1100_CERF) += sa1100_cerf.o
sa1100_cs-$(CONFIG_SA1100_COLLIE) += pxa2xx_sharpsl.o
sa1100_cs-$(CONFIG_SA1100_H3100) += sa1100_h3600.o
sa1100_cs-$(CONFIG_SA1100_H3600) += sa1100_h3600.o
Expand Down
86 changes: 0 additions & 86 deletions drivers/pcmcia/sa1100_cerf.c

This file was deleted.

3 changes: 0 additions & 3 deletions drivers/pcmcia/sa1100_generic.c
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,6 @@ static struct pcmcia_low_level sa11x0_cf_ops = {
int __init pcmcia_collie_init(struct device *dev);

static int (*sa11x0_pcmcia_legacy_hw_init[])(struct device *dev) = {
#ifdef CONFIG_SA1100_CERF
pcmcia_cerf_init,
#endif
#if defined(CONFIG_SA1100_H3100) || defined(CONFIG_SA1100_H3600)
pcmcia_h3600_init,
#endif
Expand Down
1 change: 0 additions & 1 deletion drivers/pcmcia/sa1100_generic.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
*/
extern int pcmcia_adsbitsy_init(struct device *);
extern int pcmcia_badge4_init(struct device *);
extern int pcmcia_cerf_init(struct device *);
extern int pcmcia_flexanet_init(struct device *);
extern int pcmcia_freebird_init(struct device *);
extern int pcmcia_gcplus_init(struct device *);
Expand Down

0 comments on commit 780febd

Please sign in to comment.