From b51af86559d4b5c831abbec545c76f721a8d8237 Mon Sep 17 00:00:00 2001 From: Russell King Date: Wed, 31 Aug 2016 08:49:48 +0100 Subject: ARM: sa1100/shannon: convert to generic CF sockets Convert shannon to use the generic CF socket support. Signed-off-by: Russell King --- drivers/pcmcia/Makefile | 1 - drivers/pcmcia/sa1100_generic.c | 3 -- drivers/pcmcia/sa1100_generic.h | 1 - drivers/pcmcia/sa1100_shannon.c | 104 ---------------------------------------- 4 files changed, 109 deletions(-) delete mode 100644 drivers/pcmcia/sa1100_shannon.c (limited to 'drivers/pcmcia') diff --git a/drivers/pcmcia/Makefile b/drivers/pcmcia/Makefile index 722871ac51b4..7f501d38a7a2 100644 --- a/drivers/pcmcia/Makefile +++ b/drivers/pcmcia/Makefile @@ -49,7 +49,6 @@ sa1100_cs-y += sa1100_generic.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 -sa1100_cs-$(CONFIG_SA1100_SHANNON) += sa1100_shannon.o sa1100_cs-$(CONFIG_SA1100_SIMPAD) += sa1100_simpad.o pxa2xx_cm_x2xx_cs-y += pxa2xx_cm_x2xx.o pxa2xx_cm_x255.o pxa2xx_cm_x270.o diff --git a/drivers/pcmcia/sa1100_generic.c b/drivers/pcmcia/sa1100_generic.c index 59a670f330b7..47b060c57418 100644 --- a/drivers/pcmcia/sa1100_generic.c +++ b/drivers/pcmcia/sa1100_generic.c @@ -101,9 +101,6 @@ static int (*sa11x0_pcmcia_legacy_hw_init[])(struct device *dev) = { #if defined(CONFIG_SA1100_H3100) || defined(CONFIG_SA1100_H3600) pcmcia_h3600_init, #endif -#ifdef CONFIG_SA1100_SHANNON - pcmcia_shannon_init, -#endif #ifdef CONFIG_SA1100_SIMPAD pcmcia_simpad_init, #endif diff --git a/drivers/pcmcia/sa1100_generic.h b/drivers/pcmcia/sa1100_generic.h index 1e255c173cd8..7b7cdcd20187 100644 --- a/drivers/pcmcia/sa1100_generic.h +++ b/drivers/pcmcia/sa1100_generic.h @@ -14,7 +14,6 @@ extern int pcmcia_graphicsmaster_init(struct device *); extern int pcmcia_h3600_init(struct device *); extern int pcmcia_pangolin_init(struct device *); extern int pcmcia_pfs168_init(struct device *); -extern int pcmcia_shannon_init(struct device *); extern int pcmcia_simpad_init(struct device *); extern int pcmcia_stork_init(struct device *); extern int pcmcia_system3_init(struct device *); diff --git a/drivers/pcmcia/sa1100_shannon.c b/drivers/pcmcia/sa1100_shannon.c deleted file mode 100644 index 0e52a575986e..000000000000 --- a/drivers/pcmcia/sa1100_shannon.c +++ /dev/null @@ -1,104 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0 -/* - * drivers/pcmcia/sa1100_shannon.c - * - * PCMCIA implementation routines for Shannon - * - */ -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include "sa1100_generic.h" - -static int shannon_pcmcia_hw_init(struct soc_pcmcia_socket *skt) -{ - /* All those are inputs */ - GAFR &= ~(GPIO_GPIO(SHANNON_GPIO_EJECT_0) | - GPIO_GPIO(SHANNON_GPIO_EJECT_1) | - GPIO_GPIO(SHANNON_GPIO_RDY_0) | - GPIO_GPIO(SHANNON_GPIO_RDY_1)); - - if (skt->nr == 0) { - skt->stat[SOC_STAT_CD].gpio = SHANNON_GPIO_EJECT_0; - skt->stat[SOC_STAT_CD].name = "PCMCIA_CD_0"; - skt->stat[SOC_STAT_RDY].gpio = SHANNON_GPIO_RDY_0; - skt->stat[SOC_STAT_RDY].name = "PCMCIA_RDY_0"; - } else { - skt->stat[SOC_STAT_CD].gpio = SHANNON_GPIO_EJECT_1; - skt->stat[SOC_STAT_CD].name = "PCMCIA_CD_1"; - skt->stat[SOC_STAT_RDY].gpio = SHANNON_GPIO_RDY_1; - skt->stat[SOC_STAT_RDY].name = "PCMCIA_RDY_1"; - } - - return 0; -} - -static void -shannon_pcmcia_socket_state(struct soc_pcmcia_socket *skt, - struct pcmcia_state *state) -{ - switch (skt->nr) { - case 0: - state->bvd1 = 1; - state->bvd2 = 1; - state->vs_3v = 1; /* FIXME Can only apply 3.3V on Shannon. */ - state->vs_Xv = 0; - break; - - case 1: - state->bvd1 = 1; - state->bvd2 = 1; - state->vs_3v = 1; /* FIXME Can only apply 3.3V on Shannon. */ - state->vs_Xv = 0; - break; - } -} - -static int -shannon_pcmcia_configure_socket(struct soc_pcmcia_socket *skt, - const socket_state_t *state) -{ - switch (state->Vcc) { - case 0: /* power off */ - printk(KERN_WARNING "%s(): CS asked for 0V, still applying 3.3V..\n", __func__); - break; - case 50: - printk(KERN_WARNING "%s(): CS asked for 5V, applying 3.3V..\n", __func__); - case 33: - break; - default: - printk(KERN_ERR "%s(): unrecognized Vcc %u\n", - __func__, state->Vcc); - return -1; - } - - printk(KERN_WARNING "%s(): Warning, Can't perform reset\n", __func__); - - /* Silently ignore Vpp, output enable, speaker enable. */ - - return 0; -} - -static struct pcmcia_low_level shannon_pcmcia_ops = { - .owner = THIS_MODULE, - .hw_init = shannon_pcmcia_hw_init, - .socket_state = shannon_pcmcia_socket_state, - .configure_socket = shannon_pcmcia_configure_socket, -}; - -int pcmcia_shannon_init(struct device *dev) -{ - int ret = -ENODEV; - - if (machine_is_shannon()) - ret = sa11xx_drv_pcmcia_probe(dev, &shannon_pcmcia_ops, 0, 2); - - return ret; -} -- cgit v1.2.3-59-g8ed1b