diff options
author | Arnd Bergmann <arnd@arndb.de> | 2022-09-30 16:23:21 +0200 |
---|---|---|
committer | Arnd Bergmann <arnd@arndb.de> | 2023-02-01 17:23:38 +0100 |
commit | 7aeffbf2ddec5ef0f8b8690bd392e5dabbfed820 (patch) | |
tree | 67377c7209366606288b520face485309546b2f3 /drivers/pcmcia | |
parent | 8f00ddfb7684fae69d2108991f9c72fcb72b3f5e (diff) | |
download | linux-stable-7aeffbf2ddec5ef0f8b8690bd392e5dabbfed820.tar.gz linux-stable-7aeffbf2ddec5ef0f8b8690bd392e5dabbfed820.tar.bz2 linux-stable-7aeffbf2ddec5ef0f8b8690bd392e5dabbfed820.zip |
pcmcia: remove unused pxa/sa1100 drivers
A number of boards got removed, so this code is now orphaned.
Cc: Dominik Brodowski <linux@dominikbrodowski.net>
Acked-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'drivers/pcmcia')
-rw-r--r-- | drivers/pcmcia/Kconfig | 12 | ||||
-rw-r--r-- | drivers/pcmcia/Makefile | 5 | ||||
-rw-r--r-- | drivers/pcmcia/pxa2xx_mainstone.c | 122 | ||||
-rw-r--r-- | drivers/pcmcia/sa1100_simpad.c | 115 | ||||
-rw-r--r-- | drivers/pcmcia/sa1111_badge4.c | 158 | ||||
-rw-r--r-- | drivers/pcmcia/sa1111_lubbock.c | 155 |
6 files changed, 2 insertions, 565 deletions
diff --git a/drivers/pcmcia/Kconfig b/drivers/pcmcia/Kconfig index 1525023e49b6..44c16508ef14 100644 --- a/drivers/pcmcia/Kconfig +++ b/drivers/pcmcia/Kconfig @@ -194,10 +194,8 @@ config PCMCIA_SA1111 tristate "SA1111 support" depends on ARM && SA1111 && PCMCIA select PCMCIA_SOC_COMMON - select PCMCIA_SA11XX_BASE if ARCH_SA1100 - select PCMCIA_PXA2XX if ARCH_LUBBOCK && SA1111 + select PCMCIA_SA11XX_BASE select PCMCIA_MAX1600 if ASSABET_NEPONSET - select PCMCIA_MAX1600 if ARCH_LUBBOCK && SA1111 help Say Y here to include support for SA1111-based PCMCIA or CF sockets, found on the Jornada 720, Graphicsmaster and other @@ -207,14 +205,8 @@ config PCMCIA_SA1111 config PCMCIA_PXA2XX tristate "PXA2xx support" - depends on ARM && ARCH_PXA && PCMCIA - depends on (ARCH_LUBBOCK || MACH_MAINSTONE || PXA_SHARPSL \ - || ARCH_PXA_PALM || TRIZEPS_PCMCIA \ - || ARCOM_PCMCIA || ARCH_PXA_ESERIES \ - || MACH_VPAC270 || MACH_BALLOON3 || MACH_COLIBRI \ - || MACH_COLIBRI320 || MACH_H4700) + depends on ARM && ARCH_PXA && PCMCIA && PXA_SHARPSL select PCMCIA_SOC_COMMON - select PCMCIA_MAX1600 if MACH_MAINSTONE help Say Y here to include support for the PXA2xx PCMCIA controller diff --git a/drivers/pcmcia/Makefile b/drivers/pcmcia/Makefile index b3a2accf47af..c9d51b150682 100644 --- a/drivers/pcmcia/Makefile +++ b/drivers/pcmcia/Makefile @@ -36,17 +36,12 @@ obj-$(CONFIG_PCMCIA_MAX1600) += max1600.o sa1111_cs-y += sa1111_generic.o sa1111_cs-$(CONFIG_ASSABET_NEPONSET) += sa1111_neponset.o -sa1111_cs-$(CONFIG_SA1100_BADGE4) += sa1111_badge4.o 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_COLLIE) += pxa2xx_sharpsl.o -sa1100_cs-$(CONFIG_SA1100_H3100) += sa1100_h3600.o sa1100_cs-$(CONFIG_SA1100_H3600) += sa1100_h3600.o -sa1100_cs-$(CONFIG_SA1100_SIMPAD) += sa1100_simpad.o -pxa2xx-obj-$(CONFIG_MACH_MAINSTONE) += pxa2xx_mainstone.o pxa2xx-obj-$(CONFIG_PXA_SHARPSL) += pxa2xx_sharpsl.o obj-$(CONFIG_PCMCIA_PXA2XX) += pxa2xx_base.o $(pxa2xx-obj-y) obj-$(CONFIG_PCMCIA_XXS1500) += xxs1500_ss.o diff --git a/drivers/pcmcia/pxa2xx_mainstone.c b/drivers/pcmcia/pxa2xx_mainstone.c deleted file mode 100644 index a076e4108452..000000000000 --- a/drivers/pcmcia/pxa2xx_mainstone.c +++ /dev/null @@ -1,122 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0-only -/* - * linux/drivers/pcmcia/pxa2xx_mainstone.c - * - * Mainstone PCMCIA specific routines. - * - * Created: May 12, 2004 - * Author: Nicolas Pitre - * Copyright: MontaVista Software Inc. - */ -#include <linux/gpio/consumer.h> -#include <linux/module.h> -#include <linux/init.h> -#include <linux/interrupt.h> -#include <linux/kernel.h> -#include <linux/errno.h> -#include <linux/platform_device.h> - -#include <pcmcia/ss.h> - -#include <asm/mach-types.h> - -#include "soc_common.h" -#include "max1600.h" - -static int mst_pcmcia_hw_init(struct soc_pcmcia_socket *skt) -{ - struct device *dev = skt->socket.dev.parent; - struct max1600 *m; - int ret; - - skt->stat[SOC_STAT_CD].name = skt->nr ? "bdetect" : "adetect"; - skt->stat[SOC_STAT_BVD1].name = skt->nr ? "bbvd1" : "abvd1"; - skt->stat[SOC_STAT_BVD2].name = skt->nr ? "bbvd2" : "abvd2"; - skt->stat[SOC_STAT_RDY].name = skt->nr ? "bready" : "aready"; - skt->stat[SOC_STAT_VS1].name = skt->nr ? "bvs1" : "avs1"; - skt->stat[SOC_STAT_VS2].name = skt->nr ? "bvs2" : "avs2"; - - skt->gpio_reset = devm_gpiod_get(dev, skt->nr ? "breset" : "areset", - GPIOD_OUT_HIGH); - if (IS_ERR(skt->gpio_reset)) - return PTR_ERR(skt->gpio_reset); - - ret = max1600_init(dev, &m, skt->nr ? MAX1600_CHAN_B : MAX1600_CHAN_A, - MAX1600_CODE_HIGH); - if (ret) - return ret; - - skt->driver_data = m; - - return soc_pcmcia_request_gpiods(skt); -} - -static unsigned int mst_pcmcia_bvd1_status[2]; - -static void mst_pcmcia_socket_state(struct soc_pcmcia_socket *skt, - struct pcmcia_state *state) -{ - unsigned int flip = mst_pcmcia_bvd1_status[skt->nr] ^ state->bvd1; - - /* - * Workaround for STSCHG which can't be deasserted: - * We therefore disable/enable corresponding IRQs - * as needed to avoid IRQ locks. - */ - if (flip) { - mst_pcmcia_bvd1_status[skt->nr] = state->bvd1; - if (state->bvd1) - enable_irq(skt->stat[SOC_STAT_BVD1].irq); - else - disable_irq(skt->stat[SOC_STAT_BVD2].irq); - } -} - -static int mst_pcmcia_configure_socket(struct soc_pcmcia_socket *skt, - const socket_state_t *state) -{ - return max1600_configure(skt->driver_data, state->Vcc, state->Vpp); -} - -static struct pcmcia_low_level mst_pcmcia_ops __initdata = { - .owner = THIS_MODULE, - .hw_init = mst_pcmcia_hw_init, - .socket_state = mst_pcmcia_socket_state, - .configure_socket = mst_pcmcia_configure_socket, - .nr = 2, -}; - -static struct platform_device *mst_pcmcia_device; - -static int __init mst_pcmcia_init(void) -{ - int ret; - - if (!machine_is_mainstone()) - return -ENODEV; - - mst_pcmcia_device = platform_device_alloc("pxa2xx-pcmcia", -1); - if (!mst_pcmcia_device) - return -ENOMEM; - - ret = platform_device_add_data(mst_pcmcia_device, &mst_pcmcia_ops, - sizeof(mst_pcmcia_ops)); - if (ret == 0) - ret = platform_device_add(mst_pcmcia_device); - - if (ret) - platform_device_put(mst_pcmcia_device); - - return ret; -} - -static void __exit mst_pcmcia_exit(void) -{ - platform_device_unregister(mst_pcmcia_device); -} - -fs_initcall(mst_pcmcia_init); -module_exit(mst_pcmcia_exit); - -MODULE_LICENSE("GPL"); -MODULE_ALIAS("platform:pxa2xx-pcmcia"); diff --git a/drivers/pcmcia/sa1100_simpad.c b/drivers/pcmcia/sa1100_simpad.c deleted file mode 100644 index 784ada5b8c4f..000000000000 --- a/drivers/pcmcia/sa1100_simpad.c +++ /dev/null @@ -1,115 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0 -/* - * drivers/pcmcia/sa1100_simpad.c - * - * PCMCIA implementation routines for simpad - * - */ -#include <linux/module.h> -#include <linux/kernel.h> -#include <linux/device.h> -#include <linux/init.h> - -#include <mach/hardware.h> -#include <asm/mach-types.h> -#include <mach/simpad.h> -#include "sa1100_generic.h" - -static int simpad_pcmcia_hw_init(struct soc_pcmcia_socket *skt) -{ - - simpad_clear_cs3_bit(VCC_3V_EN|VCC_5V_EN|EN0|EN1); - - skt->stat[SOC_STAT_CD].name = "cf-detect"; - skt->stat[SOC_STAT_RDY].name = "cf-ready"; - - return soc_pcmcia_request_gpiods(skt); -} - -static void simpad_pcmcia_hw_shutdown(struct soc_pcmcia_socket *skt) -{ - /* Disable CF bus: */ - /*simpad_set_cs3_bit(PCMCIA_BUFF_DIS);*/ - simpad_clear_cs3_bit(PCMCIA_RESET); -} - -static void -simpad_pcmcia_socket_state(struct soc_pcmcia_socket *skt, - struct pcmcia_state *state) -{ - long cs3reg = simpad_get_cs3_ro(); - - /* bvd1 might be cs3reg & PCMCIA_BVD1 */ - /* bvd2 might be cs3reg & PCMCIA_BVD2 */ - - if ((cs3reg & (PCMCIA_VS1|PCMCIA_VS2)) == - (PCMCIA_VS1|PCMCIA_VS2)) { - state->vs_3v=0; - state->vs_Xv=0; - } else { - state->vs_3v=1; - state->vs_Xv=0; - } -} - -static int -simpad_pcmcia_configure_socket(struct soc_pcmcia_socket *skt, - const socket_state_t *state) -{ - unsigned long flags; - - local_irq_save(flags); - - /* Murphy: see table of MIC2562a-1 */ - switch (state->Vcc) { - case 0: - simpad_clear_cs3_bit(VCC_3V_EN|VCC_5V_EN|EN0|EN1); - break; - - case 33: - simpad_clear_cs3_bit(VCC_3V_EN|EN1); - simpad_set_cs3_bit(VCC_5V_EN|EN0); - break; - - case 50: - simpad_clear_cs3_bit(VCC_5V_EN|EN1); - simpad_set_cs3_bit(VCC_3V_EN|EN0); - break; - - default: - printk(KERN_ERR "%s(): unrecognized Vcc %u\n", - __func__, state->Vcc); - simpad_clear_cs3_bit(VCC_3V_EN|VCC_5V_EN|EN0|EN1); - local_irq_restore(flags); - return -1; - } - - - local_irq_restore(flags); - - return 0; -} - -static void simpad_pcmcia_socket_suspend(struct soc_pcmcia_socket *skt) -{ - simpad_set_cs3_bit(PCMCIA_RESET); -} - -static struct pcmcia_low_level simpad_pcmcia_ops = { - .owner = THIS_MODULE, - .hw_init = simpad_pcmcia_hw_init, - .hw_shutdown = simpad_pcmcia_hw_shutdown, - .socket_state = simpad_pcmcia_socket_state, - .configure_socket = simpad_pcmcia_configure_socket, - .socket_suspend = simpad_pcmcia_socket_suspend, -}; - -int pcmcia_simpad_init(struct device *dev) -{ - int ret = -ENODEV; - - if (machine_is_simpad()) - ret = sa11xx_drv_pcmcia_probe(dev, &simpad_pcmcia_ops, 1, 1); - - return ret; -} diff --git a/drivers/pcmcia/sa1111_badge4.c b/drivers/pcmcia/sa1111_badge4.c deleted file mode 100644 index e76d5ba921dd..000000000000 --- a/drivers/pcmcia/sa1111_badge4.c +++ /dev/null @@ -1,158 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0-only -/* - * linux/drivers/pcmcia/sa1100_badge4.c - * - * BadgePAD 4 PCMCIA specific routines - * - * Christopher Hoover <ch@hpl.hp.com> - * - * Copyright (C) 2002 Hewlett-Packard Company - */ -#include <linux/module.h> -#include <linux/kernel.h> -#include <linux/device.h> -#include <linux/errno.h> -#include <linux/init.h> - -#include <mach/hardware.h> -#include <asm/mach-types.h> -#include <mach/badge4.h> -#include <asm/hardware/sa1111.h> - -#include "sa1111_generic.h" - -/* - * BadgePAD 4 Details - * - * PCM Vcc: - * - * PCM Vcc on BadgePAD 4 can be jumpered for 3v3 (short pins 1 and 3 - * on JP6) or 5v0 (short pins 3 and 5 on JP6). - * - * PCM Vpp: - * - * PCM Vpp on BadgePAD 4 can be jumpered for 12v0 (short pins 4 and 6 - * on JP6) or tied to PCM Vcc (short pins 2 and 4 on JP6). N.B., - * 12v0 operation requires that the power supply actually supply 12v0 - * via pin 7 of JP7. - * - * CF Vcc: - * - * CF Vcc on BadgePAD 4 can be jumpered either for 3v3 (short pins 1 - * and 2 on JP10) or 5v0 (short pins 2 and 3 on JP10). - * - * Unfortunately there's no way programmatically to determine how a - * given board is jumpered. This code assumes a default jumpering - * as described below. - * - * If the defaults aren't correct, you may override them with a pcmv - * setup argument: pcmv=<pcm vcc>,<pcm vpp>,<cf vcc>. The units are - * tenths of volts; e.g. pcmv=33,120,50 indicates 3v3 PCM Vcc, 12v0 - * PCM Vpp, and 5v0 CF Vcc. - * - */ - -static int badge4_pcmvcc = 50; /* pins 3 and 5 jumpered on JP6 */ -static int badge4_pcmvpp = 50; /* pins 2 and 4 jumpered on JP6 */ -static int badge4_cfvcc = 33; /* pins 1 and 2 jumpered on JP10 */ - -static void complain_about_jumpering(const char *whom, - const char *supply, - int given, int wanted) -{ - printk(KERN_ERR - "%s: %s %d.%dV wanted but board is jumpered for %s %d.%dV operation" - "; re-jumper the board and/or use pcmv=xx,xx,xx\n", - whom, supply, - wanted / 10, wanted % 10, - supply, - given / 10, given % 10); -} - -static int -badge4_pcmcia_configure_socket(struct soc_pcmcia_socket *skt, const socket_state_t *state) -{ - int ret; - - switch (skt->nr) { - case 0: - if ((state->Vcc != 0) && - (state->Vcc != badge4_pcmvcc)) { - complain_about_jumpering(__func__, "pcmvcc", - badge4_pcmvcc, state->Vcc); - // Apply power regardless of the jumpering. - // return -1; - } - if ((state->Vpp != 0) && - (state->Vpp != badge4_pcmvpp)) { - complain_about_jumpering(__func__, "pcmvpp", - badge4_pcmvpp, state->Vpp); - return -1; - } - break; - - case 1: - if ((state->Vcc != 0) && - (state->Vcc != badge4_cfvcc)) { - complain_about_jumpering(__func__, "cfvcc", - badge4_cfvcc, state->Vcc); - return -1; - } - break; - - default: - return -1; - } - - ret = sa1111_pcmcia_configure_socket(skt, state); - if (ret == 0) { - unsigned long flags; - int need5V; - - local_irq_save(flags); - - need5V = ((state->Vcc == 50) || (state->Vpp == 50)); - - badge4_set_5V(BADGE4_5V_PCMCIA_SOCK(skt->nr), need5V); - - local_irq_restore(flags); - } - - return ret; -} - -static struct pcmcia_low_level badge4_pcmcia_ops = { - .owner = THIS_MODULE, - .configure_socket = badge4_pcmcia_configure_socket, - .first = 0, - .nr = 2, -}; - -int pcmcia_badge4_init(struct sa1111_dev *dev) -{ - printk(KERN_INFO - "%s: badge4_pcmvcc=%d, badge4_pcmvpp=%d, badge4_cfvcc=%d\n", - __func__, - badge4_pcmvcc, badge4_pcmvpp, badge4_cfvcc); - - sa11xx_drv_pcmcia_ops(&badge4_pcmcia_ops); - return sa1111_pcmcia_add(dev, &badge4_pcmcia_ops, - sa11xx_drv_pcmcia_add_one); -} - -#ifndef MODULE -static int __init pcmv_setup(char *s) -{ - int v[4]; - - s = get_options(s, ARRAY_SIZE(v), v); - - if (v[0] >= 1) badge4_pcmvcc = v[1]; - if (v[0] >= 2) badge4_pcmvpp = v[2]; - if (v[0] >= 3) badge4_cfvcc = v[3]; - - return 1; -} - -__setup("pcmv=", pcmv_setup); -#endif diff --git a/drivers/pcmcia/sa1111_lubbock.c b/drivers/pcmcia/sa1111_lubbock.c deleted file mode 100644 index f1b5160cb8fa..000000000000 --- a/drivers/pcmcia/sa1111_lubbock.c +++ /dev/null @@ -1,155 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0-only -/* - * linux/drivers/pcmcia/pxa2xx_lubbock.c - * - * Author: George Davis - * Created: Jan 10, 2002 - * Copyright: MontaVista Software Inc. - * - * Originally based upon linux/drivers/pcmcia/sa1100_neponset.c - * - * Lubbock PCMCIA specific routines. - */ -#include <linux/module.h> -#include <linux/kernel.h> -#include <linux/device.h> -#include <linux/errno.h> -#include <linux/init.h> -#include <linux/delay.h> - -#include <asm/hardware/sa1111.h> -#include <asm/mach-types.h> - -#include "sa1111_generic.h" -#include "max1600.h" - -static int lubbock_pcmcia_hw_init(struct soc_pcmcia_socket *skt) -{ - struct max1600 *m; - int ret; - - ret = max1600_init(skt->socket.dev.parent, &m, - skt->nr ? MAX1600_CHAN_B : MAX1600_CHAN_A, - MAX1600_CODE_HIGH); - if (ret == 0) - skt->driver_data = m; - - return ret; -} - -static int -lubbock_pcmcia_configure_socket(struct soc_pcmcia_socket *skt, - const socket_state_t *state) -{ - struct max1600 *m = skt->driver_data; - int ret = 0; - - /* Lubbock uses the Maxim MAX1602, with the following connections: - * - * Socket 0 (PCMCIA): - * MAX1602 Lubbock Register - * Pin Signal - * ----- ------- ---------------------- - * A0VPP S0_PWR0 SA-1111 GPIO A<0> - * A1VPP S0_PWR1 SA-1111 GPIO A<1> - * A0VCC S0_PWR2 SA-1111 GPIO A<2> - * A1VCC S0_PWR3 SA-1111 GPIO A<3> - * VX VCC - * VY +3.3V - * 12IN +12V - * CODE +3.3V Cirrus Code, CODE = High (VY) - * - * Socket 1 (CF): - * MAX1602 Lubbock Register - * Pin Signal - * ----- ------- ---------------------- - * A0VPP GND VPP is not connected - * A1VPP GND VPP is not connected - * A0VCC S1_PWR0 MISC_WR<14> - * A1VCC S1_PWR1 MISC_WR<15> - * VX VCC - * VY +3.3V - * 12IN GND VPP is not connected - * CODE +3.3V Cirrus Code, CODE = High (VY) - * - */ - - again: - switch (skt->nr) { - case 0: - case 1: - break; - - default: - ret = -1; - } - - if (ret == 0) - ret = sa1111_pcmcia_configure_socket(skt, state); - if (ret == 0) - ret = max1600_configure(m, state->Vcc, state->Vpp); - -#if 1 - if (ret == 0 && state->Vcc == 33) { - struct pcmcia_state new_state; - - /* - * HACK ALERT: - * We can't sense the voltage properly on Lubbock before - * actually applying some power to the socket (catch 22). - * Resense the socket Voltage Sense pins after applying - * socket power. - * - * Note: It takes about 2.5ms for the MAX1602 VCC output - * to rise. - */ - mdelay(3); - - sa1111_pcmcia_socket_state(skt, &new_state); - - if (!new_state.vs_3v && !new_state.vs_Xv) { - /* - * Switch to 5V, Configure socket with 5V voltage - */ - max1600_configure(m, 0, 0); - - /* - * It takes about 100ms to turn off Vcc. - */ - mdelay(100); - - /* - * We need to hack around the const qualifier as - * well to keep this ugly workaround localized and - * not force it to the rest of the code. Barf bags - * available in the seat pocket in front of you! - */ - ((socket_state_t *)state)->Vcc = 50; - ((socket_state_t *)state)->Vpp = 50; - goto again; - } - } -#endif - - return ret; -} - -static struct pcmcia_low_level lubbock_pcmcia_ops = { - .owner = THIS_MODULE, - .hw_init = lubbock_pcmcia_hw_init, - .configure_socket = lubbock_pcmcia_configure_socket, - .first = 0, - .nr = 2, -}; - -#include "pxa2xx_base.h" - -int pcmcia_lubbock_init(struct sa1111_dev *sadev) -{ - pxa2xx_drv_pcmcia_ops(&lubbock_pcmcia_ops); - pxa2xx_configure_sockets(&sadev->dev, &lubbock_pcmcia_ops); - return sa1111_pcmcia_add(sadev, &lubbock_pcmcia_ops, - pxa2xx_drv_pcmcia_add_one); -} - -MODULE_LICENSE("GPL"); |