diff options
| author | Russell King <rmk+kernel@armlinux.org.uk> | 2016-08-31 03:49:48 -0400 |
|---|---|---|
| committer | Russell King <rmk+kernel@armlinux.org.uk> | 2018-04-06 10:53:22 -0400 |
| commit | b51af86559d4b5c831abbec545c76f721a8d8237 (patch) | |
| tree | c7bf1169b7c472851ac532a8d6a5fc12917ce28f /drivers/pcmcia | |
| parent | 80c799dbf88d0b404e1304b469eb157e4e9e0fbf (diff) | |
ARM: sa1100/shannon: convert to generic CF sockets
Convert shannon to use the generic CF socket support.
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Diffstat (limited to 'drivers/pcmcia')
| -rw-r--r-- | drivers/pcmcia/Makefile | 1 | ||||
| -rw-r--r-- | drivers/pcmcia/sa1100_generic.c | 3 | ||||
| -rw-r--r-- | drivers/pcmcia/sa1100_generic.h | 1 | ||||
| -rw-r--r-- | drivers/pcmcia/sa1100_shannon.c | 104 |
4 files changed, 0 insertions, 109 deletions
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 | |||
| 49 | sa1100_cs-$(CONFIG_SA1100_COLLIE) += pxa2xx_sharpsl.o | 49 | sa1100_cs-$(CONFIG_SA1100_COLLIE) += pxa2xx_sharpsl.o |
| 50 | sa1100_cs-$(CONFIG_SA1100_H3100) += sa1100_h3600.o | 50 | sa1100_cs-$(CONFIG_SA1100_H3100) += sa1100_h3600.o |
| 51 | sa1100_cs-$(CONFIG_SA1100_H3600) += sa1100_h3600.o | 51 | sa1100_cs-$(CONFIG_SA1100_H3600) += sa1100_h3600.o |
| 52 | sa1100_cs-$(CONFIG_SA1100_SHANNON) += sa1100_shannon.o | ||
| 53 | sa1100_cs-$(CONFIG_SA1100_SIMPAD) += sa1100_simpad.o | 52 | sa1100_cs-$(CONFIG_SA1100_SIMPAD) += sa1100_simpad.o |
| 54 | 53 | ||
| 55 | pxa2xx_cm_x2xx_cs-y += pxa2xx_cm_x2xx.o pxa2xx_cm_x255.o pxa2xx_cm_x270.o | 54 | 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) = { | |||
| 101 | #if defined(CONFIG_SA1100_H3100) || defined(CONFIG_SA1100_H3600) | 101 | #if defined(CONFIG_SA1100_H3100) || defined(CONFIG_SA1100_H3600) |
| 102 | pcmcia_h3600_init, | 102 | pcmcia_h3600_init, |
| 103 | #endif | 103 | #endif |
| 104 | #ifdef CONFIG_SA1100_SHANNON | ||
| 105 | pcmcia_shannon_init, | ||
| 106 | #endif | ||
| 107 | #ifdef CONFIG_SA1100_SIMPAD | 104 | #ifdef CONFIG_SA1100_SIMPAD |
| 108 | pcmcia_simpad_init, | 105 | pcmcia_simpad_init, |
| 109 | #endif | 106 | #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 *); | |||
| 14 | extern int pcmcia_h3600_init(struct device *); | 14 | extern int pcmcia_h3600_init(struct device *); |
| 15 | extern int pcmcia_pangolin_init(struct device *); | 15 | extern int pcmcia_pangolin_init(struct device *); |
| 16 | extern int pcmcia_pfs168_init(struct device *); | 16 | extern int pcmcia_pfs168_init(struct device *); |
| 17 | extern int pcmcia_shannon_init(struct device *); | ||
| 18 | extern int pcmcia_simpad_init(struct device *); | 17 | extern int pcmcia_simpad_init(struct device *); |
| 19 | extern int pcmcia_stork_init(struct device *); | 18 | extern int pcmcia_stork_init(struct device *); |
| 20 | extern int pcmcia_system3_init(struct device *); | 19 | 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 @@ | |||
| 1 | // SPDX-License-Identifier: GPL-2.0 | ||
| 2 | /* | ||
| 3 | * drivers/pcmcia/sa1100_shannon.c | ||
| 4 | * | ||
| 5 | * PCMCIA implementation routines for Shannon | ||
| 6 | * | ||
| 7 | */ | ||
| 8 | #include <linux/module.h> | ||
| 9 | #include <linux/kernel.h> | ||
| 10 | #include <linux/device.h> | ||
| 11 | #include <linux/init.h> | ||
| 12 | #include <linux/io.h> | ||
| 13 | |||
| 14 | #include <mach/hardware.h> | ||
| 15 | #include <asm/mach-types.h> | ||
| 16 | #include <mach/shannon.h> | ||
| 17 | #include <asm/irq.h> | ||
| 18 | #include "sa1100_generic.h" | ||
| 19 | |||
| 20 | static int shannon_pcmcia_hw_init(struct soc_pcmcia_socket *skt) | ||
| 21 | { | ||
| 22 | /* All those are inputs */ | ||
| 23 | GAFR &= ~(GPIO_GPIO(SHANNON_GPIO_EJECT_0) | | ||
| 24 | GPIO_GPIO(SHANNON_GPIO_EJECT_1) | | ||
| 25 | GPIO_GPIO(SHANNON_GPIO_RDY_0) | | ||
| 26 | GPIO_GPIO(SHANNON_GPIO_RDY_1)); | ||
| 27 | |||
| 28 | if (skt->nr == 0) { | ||
| 29 | skt->stat[SOC_STAT_CD].gpio = SHANNON_GPIO_EJECT_0; | ||
| 30 | skt->stat[SOC_STAT_CD].name = "PCMCIA_CD_0"; | ||
| 31 | skt->stat[SOC_STAT_RDY].gpio = SHANNON_GPIO_RDY_0; | ||
| 32 | skt->stat[SOC_STAT_RDY].name = "PCMCIA_RDY_0"; | ||
| 33 | } else { | ||
| 34 | skt->stat[SOC_STAT_CD].gpio = SHANNON_GPIO_EJECT_1; | ||
| 35 | skt->stat[SOC_STAT_CD].name = "PCMCIA_CD_1"; | ||
| 36 | skt->stat[SOC_STAT_RDY].gpio = SHANNON_GPIO_RDY_1; | ||
| 37 | skt->stat[SOC_STAT_RDY].name = "PCMCIA_RDY_1"; | ||
| 38 | } | ||
| 39 | |||
| 40 | return 0; | ||
| 41 | } | ||
| 42 | |||
| 43 | static void | ||
| 44 | shannon_pcmcia_socket_state(struct soc_pcmcia_socket *skt, | ||
| 45 | struct pcmcia_state *state) | ||
| 46 | { | ||
| 47 | switch (skt->nr) { | ||
| 48 | case 0: | ||
| 49 | state->bvd1 = 1; | ||
| 50 | state->bvd2 = 1; | ||
| 51 | state->vs_3v = 1; /* FIXME Can only apply 3.3V on Shannon. */ | ||
| 52 | state->vs_Xv = 0; | ||
| 53 | break; | ||
| 54 | |||
| 55 | case 1: | ||
| 56 | state->bvd1 = 1; | ||
| 57 | state->bvd2 = 1; | ||
| 58 | state->vs_3v = 1; /* FIXME Can only apply 3.3V on Shannon. */ | ||
| 59 | state->vs_Xv = 0; | ||
| 60 | break; | ||
| 61 | } | ||
| 62 | } | ||
| 63 | |||
| 64 | static int | ||
| 65 | shannon_pcmcia_configure_socket(struct soc_pcmcia_socket *skt, | ||
| 66 | const socket_state_t *state) | ||
| 67 | { | ||
| 68 | switch (state->Vcc) { | ||
| 69 | case 0: /* power off */ | ||
| 70 | printk(KERN_WARNING "%s(): CS asked for 0V, still applying 3.3V..\n", __func__); | ||
| 71 | break; | ||
| 72 | case 50: | ||
| 73 | printk(KERN_WARNING "%s(): CS asked for 5V, applying 3.3V..\n", __func__); | ||
| 74 | case 33: | ||
| 75 | break; | ||
| 76 | default: | ||
| 77 | printk(KERN_ERR "%s(): unrecognized Vcc %u\n", | ||
| 78 | __func__, state->Vcc); | ||
| 79 | return -1; | ||
| 80 | } | ||
| 81 | |||
| 82 | printk(KERN_WARNING "%s(): Warning, Can't perform reset\n", __func__); | ||
| 83 | |||
| 84 | /* Silently ignore Vpp, output enable, speaker enable. */ | ||
| 85 | |||
| 86 | return 0; | ||
| 87 | } | ||
| 88 | |||
| 89 | static struct pcmcia_low_level shannon_pcmcia_ops = { | ||
| 90 | .owner = THIS_MODULE, | ||
| 91 | .hw_init = shannon_pcmcia_hw_init, | ||
| 92 | .socket_state = shannon_pcmcia_socket_state, | ||
| 93 | .configure_socket = shannon_pcmcia_configure_socket, | ||
| 94 | }; | ||
| 95 | |||
| 96 | int pcmcia_shannon_init(struct device *dev) | ||
| 97 | { | ||
| 98 | int ret = -ENODEV; | ||
| 99 | |||
| 100 | if (machine_is_shannon()) | ||
| 101 | ret = sa11xx_drv_pcmcia_probe(dev, &shannon_pcmcia_ops, 0, 2); | ||
| 102 | |||
| 103 | return ret; | ||
| 104 | } | ||
