Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ARM: pxa: move pcmcia board data into mach-pxa

The drivers/pcmcia/pxa2xx_*.c are essentially part of the
board files, but for historic reasons located in drivers/pcmcia.

Move them into the same place as the actual board file to avoid
lots of machine header inclusions.

Cc: Marek Vasut <marek.vasut@gmail.com>
Cc: Dominik Brodowski <linux@dominikbrodowski.net>
Cc: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>

+165 -169
+11 -7
arch/arm/mach-pxa/Makefile
··· 37 37 obj-$(CONFIG_ARCH_PXA_IDP) += idp.o 38 38 obj-$(CONFIG_ARCH_VIPER) += viper.o 39 39 obj-$(CONFIG_MACH_ARCOM_ZEUS) += zeus.o 40 - obj-$(CONFIG_MACH_BALLOON3) += balloon3.o 40 + obj-$(CONFIG_ARCOM_PCMCIA) += viper-pcmcia.o 41 + obj-$(CONFIG_MACH_BALLOON3) += balloon3.o balloon3-pcmcia.o 41 42 obj-$(CONFIG_MACH_CSB726) += csb726.o 42 43 obj-$(CONFIG_CSB726_CSB701) += csb701.o 43 44 obj-$(CONFIG_MACH_CM_X300) += cm-x300.o ··· 48 47 obj-$(CONFIG_GUMSTIX_AM300EPD) += am300epd.o 49 48 obj-$(CONFIG_MACH_XCEP) += xcep.o 50 49 obj-$(CONFIG_MACH_TRIZEPS4) += trizeps4.o 50 + obj-$(CONFIG_TRIZEPS_PCMCIA) += trizeps4-pcmcia.o 51 51 obj-$(CONFIG_MACH_LOGICPD_PXA270) += lpd270.o 52 52 obj-$(CONFIG_MACH_PCM027) += pcm027.o 53 53 obj-$(CONFIG_MACH_PCM990_BASEBOARD) += pcm990-baseboard.o 54 - obj-$(CONFIG_MACH_COLIBRI) += colibri-pxa270.o 54 + obj-$(CONFIG_MACH_COLIBRI) += colibri-pxa270.o colibri-pcmcia.o 55 55 obj-$(CONFIG_MACH_COLIBRI_EVALBOARD) += colibri-evalboard.o 56 56 obj-$(CONFIG_MACH_COLIBRI_PXA270_INCOME) += colibri-pxa270-income.o 57 57 obj-$(CONFIG_MACH_COLIBRI300) += colibri-pxa3xx.o colibri-pxa300.o 58 - obj-$(CONFIG_MACH_COLIBRI320) += colibri-pxa3xx.o colibri-pxa320.o 59 - obj-$(CONFIG_MACH_VPAC270) += vpac270.o 58 + obj-$(CONFIG_MACH_COLIBRI320) += colibri-pxa3xx.o colibri-pxa320.o colibri-pcmcia.o 59 + obj-$(CONFIG_MACH_VPAC270) += vpac270.o vpac270-pcmcia.o 60 60 61 61 # End-user Products 62 62 obj-$(CONFIG_MACH_H4700) += hx4700.o 63 + obj-$(CONFIG_MACH_H4700) += hx4700-pcmcia.o 63 64 obj-$(CONFIG_MACH_H5000) += h5000.o 64 65 obj-$(CONFIG_MACH_HIMALAYA) += himalaya.o 65 66 obj-$(CONFIG_MACH_MAGICIAN) += magician.o ··· 69 66 obj-$(CONFIG_PXA_EZX) += ezx.o 70 67 obj-$(CONFIG_MACH_MP900C) += mp900.o 71 68 obj-$(CONFIG_MACH_PALMTE2) += palmte2.o 72 - obj-$(CONFIG_MACH_PALMTC) += palmtc.o 69 + obj-$(CONFIG_MACH_PALMTC) += palmtc.o palmtc-pcmcia.o 73 70 obj-$(CONFIG_MACH_PALM27X) += palm27x.o 74 71 obj-$(CONFIG_MACH_PALMT5) += palmt5.o 75 - obj-$(CONFIG_MACH_PALMTX) += palmtx.o 72 + obj-$(CONFIG_MACH_PALMTX) += palmtx.o palmtx-pcmcia.o 76 73 obj-$(CONFIG_MACH_PALMZ72) += palmz72.o 77 - obj-$(CONFIG_MACH_PALMLD) += palmld.o 74 + obj-$(CONFIG_MACH_PALMLD) += palmld.o palmld-pcmcia.o 78 75 obj-$(CONFIG_PALM_TREO) += palmtreo.o 79 76 obj-$(CONFIG_PXA_SHARP_C7xx) += corgi.o sharpsl_pm.o corgi_pm.o 80 77 obj-$(CONFIG_PXA_SHARP_Cxx00) += spitz.o sharpsl_pm.o spitz_pm.o ··· 82 79 obj-$(CONFIG_MACH_TOSA) += tosa.o 83 80 obj-$(CONFIG_MACH_ICONTROL) += icontrol.o mxm8x10.o 84 81 obj-$(CONFIG_ARCH_PXA_ESERIES) += eseries.o 82 + obj-$(CONFIG_MACH_E740) += e740-pcmcia.o 85 83 obj-$(CONFIG_MACH_ZIPIT2) += z2.o 86 84 87 85 obj-$(CONFIG_PXA_SYSTEMS_CPLDS) += pxa_cplds_irqs.o
+1 -1
arch/arm/mach-pxa/balloon3.c
··· 40 40 #include <asm/mach/flash.h> 41 41 42 42 #include "pxa27x.h" 43 - #include <mach/balloon3.h> 43 + #include "balloon3.h" 44 44 #include <linux/platform_data/asoc-pxa.h> 45 45 #include <linux/platform_data/video-pxafb.h> 46 46 #include <linux/platform_data/mmc-pxamci.h>
+1 -1
arch/arm/mach-pxa/include/mach/balloon3.h arch/arm/mach-pxa/balloon3.h
··· 11 11 #ifndef ASM_ARCH_BALLOON3_H 12 12 #define ASM_ARCH_BALLOON3_H 13 13 14 - #include "irqs.h" /* PXA_NR_BUILTIN_GPIO */ 14 + #include <mach/irqs.h> /* PXA_NR_BUILTIN_GPIO */ 15 15 16 16 enum balloon3_features { 17 17 BALLOON3_FEATURE_OHCI,
+1 -1
arch/arm/mach-pxa/include/mach/palmtc.h arch/arm/mach-pxa/palmtc.h
··· 12 12 #ifndef _INCLUDE_PALMTC_H_ 13 13 #define _INCLUDE_PALMTC_H_ 14 14 15 - #include "irqs.h" /* PXA_GPIO_TO_IRQ */ 15 + #include <mach/irqs.h> /* PXA_GPIO_TO_IRQ */ 16 16 17 17 /** HERE ARE GPIOs **/ 18 18
+1 -1
arch/arm/mach-pxa/include/mach/palmtx.h arch/arm/mach-pxa/palmtx.h
··· 12 12 #ifndef _INCLUDE_PALMTX_H_ 13 13 #define _INCLUDE_PALMTX_H_ 14 14 15 - #include "irqs.h" /* PXA_GPIO_TO_IRQ */ 15 + #include <mach/irqs.h> /* PXA_GPIO_TO_IRQ */ 16 16 17 17 /** HERE ARE GPIOs **/ 18 18
+1 -1
arch/arm/mach-pxa/include/mach/trizeps4.h arch/arm/mach-pxa/trizeps4.h
··· 12 12 #define _TRIPEPS4_H_ 13 13 14 14 #include <mach/addr-map.h> 15 - #include "irqs.h" /* PXA_GPIO_TO_IRQ */ 15 + #include <mach/irqs.h> /* PXA_GPIO_TO_IRQ */ 16 16 17 17 /* physical memory regions */ 18 18 #define TRIZEPS4_FLASH_PHYS (PXA_CS0_PHYS) /* Flash region */
arch/arm/mach-pxa/include/mach/vpac270.h arch/arm/mach-pxa/vpac270.h
+1 -1
arch/arm/mach-pxa/palmtc.c
··· 30 30 31 31 #include "pxa25x.h" 32 32 #include <linux/platform_data/asoc-pxa.h> 33 - #include <mach/palmtc.h> 33 + #include "palmtc.h" 34 34 #include <linux/platform_data/mmc-pxamci.h> 35 35 #include <linux/platform_data/video-pxafb.h> 36 36 #include <linux/platform_data/irda-pxaficp.h>
+1 -1
arch/arm/mach-pxa/palmtx.c
··· 33 33 34 34 #include "pxa27x.h" 35 35 #include <linux/platform_data/asoc-pxa.h> 36 - #include <mach/palmtx.h> 36 + #include "palmtx.h" 37 37 #include <linux/platform_data/mmc-pxamci.h> 38 38 #include <linux/platform_data/video-pxafb.h> 39 39 #include <linux/platform_data/irda-pxaficp.h>
+1 -1
arch/arm/mach-pxa/trizeps4.c
··· 40 40 #include <asm/mach/flash.h> 41 41 42 42 #include "pxa27x.h" 43 - #include <mach/trizeps4.h> 43 + #include "trizeps4.h" 44 44 #include <linux/platform_data/asoc-pxa.h> 45 45 #include <linux/platform_data/video-pxafb.h> 46 46 #include <linux/platform_data/mmc-pxamci.h>
+1 -1
arch/arm/mach-pxa/viper.c
··· 49 49 #include <linux/platform_data/asoc-pxa.h> 50 50 #include <linux/platform_data/video-pxafb.h> 51 51 #include "regs-uart.h" 52 - #include <linux/platform_data/pcmcia-pxa2xx_viper.h> 52 + #include "viper-pcmcia.h" 53 53 #include "viper.h" 54 54 55 55 #include <asm/setup.h>
+1 -1
arch/arm/mach-pxa/vpac270.c
··· 30 30 31 31 #include "pxa27x.h" 32 32 #include <linux/platform_data/asoc-pxa.h> 33 - #include <mach/vpac270.h> 33 + #include "vpac270.h" 34 34 #include <linux/platform_data/mmc-pxamci.h> 35 35 #include <linux/platform_data/video-pxafb.h> 36 36 #include <linux/platform_data/usb-ohci-pxa27x.h>
+1 -1
arch/arm/mach-pxa/zeus.c
··· 47 47 #include <linux/platform_data/video-pxafb.h> 48 48 #include "pm.h" 49 49 #include <linux/platform_data/asoc-pxa.h> 50 - #include <linux/platform_data/pcmcia-pxa2xx_viper.h> 50 + #include "viper-pcmcia.h" 51 51 #include "zeus.h" 52 52 #include <mach/smemc.h> 53 53
-13
drivers/pcmcia/Makefile
··· 50 50 51 51 pxa2xx-obj-$(CONFIG_MACH_MAINSTONE) += pxa2xx_mainstone.o 52 52 pxa2xx-obj-$(CONFIG_PXA_SHARPSL) += pxa2xx_sharpsl.o 53 - pxa2xx-obj-$(CONFIG_ARCOM_PCMCIA) += pxa2xx_viper.o 54 - pxa2xx-obj-$(CONFIG_TRIZEPS_PCMCIA) += pxa2xx_trizeps4.o 55 - pxa2xx-obj-$(CONFIG_MACH_PALMTX) += pxa2xx_palmtx.o 56 - pxa2xx-obj-$(CONFIG_MACH_PALMTC) += pxa2xx_palmtc.o 57 - pxa2xx-obj-$(CONFIG_MACH_PALMLD) += pxa2xx_palmld.o 58 - pxa2xx-obj-$(CONFIG_MACH_E740) += pxa2xx_e740.o 59 - pxa2xx-obj-$(CONFIG_MACH_VPAC270) += pxa2xx_vpac270.o 60 - pxa2xx-obj-$(CONFIG_MACH_BALLOON3) += pxa2xx_balloon3.o 61 - pxa2xx-obj-$(CONFIG_MACH_COLIBRI) += pxa2xx_colibri.o 62 - pxa2xx-obj-$(CONFIG_MACH_COLIBRI320) += pxa2xx_colibri.o 63 - pxa2xx-obj-$(CONFIG_MACH_H4700) += pxa2xx_hx4700.o 64 - 65 53 obj-$(CONFIG_PCMCIA_PXA2XX) += pxa2xx_base.o $(pxa2xx-obj-y) 66 - 67 54 obj-$(CONFIG_PCMCIA_XXS1500) += xxs1500_ss.o
+2 -2
drivers/pcmcia/pxa2xx_balloon3.c arch/arm/mach-pxa/balloon3-pcmcia.c
··· 20 20 #include <linux/irq.h> 21 21 #include <linux/io.h> 22 22 23 - #include <mach/balloon3.h> 23 + #include "balloon3.h" 24 24 25 25 #include <asm/mach-types.h> 26 26 27 - #include "soc_common.h" 27 + #include <pcmcia/soc_common.h> 28 28 29 29 static int balloon3_pcmcia_hw_init(struct soc_pcmcia_socket *skt) 30 30 {
+1 -1
drivers/pcmcia/pxa2xx_colibri.c arch/arm/mach-pxa/colibri-pcmcia.c
··· 14 14 15 15 #include <asm/mach-types.h> 16 16 17 - #include "soc_common.h" 17 + #include <pcmcia/soc_common.h> 18 18 19 19 #define COLIBRI270_RESET_GPIO 53 20 20 #define COLIBRI270_PPEN_GPIO 107
+1 -1
drivers/pcmcia/pxa2xx_e740.c arch/arm/mach-pxa/e740-pcmcia.c
··· 18 18 #include <asm/irq.h> 19 19 #include <asm/mach-types.h> 20 20 21 - #include "soc_common.h" 21 + #include <pcmcia/soc_common.h> 22 22 23 23 static int e740_pcmcia_hw_init(struct soc_pcmcia_socket *skt) 24 24 {
+1 -1
drivers/pcmcia/pxa2xx_hx4700.c arch/arm/mach-pxa/hx4700-pcmcia.c
··· 12 12 #include <asm/mach-types.h> 13 13 #include <mach/hx4700.h> 14 14 15 - #include "soc_common.h" 15 + #include <pcmcia/soc_common.h> 16 16 17 17 static struct gpio gpios[] = { 18 18 { GPIO114_HX4700_CF_RESET, GPIOF_OUT_INIT_LOW, "CF reset" },
+1 -1
drivers/pcmcia/pxa2xx_palmld.c arch/arm/mach-pxa/palmld-pcmcia.c
··· 14 14 15 15 #include <asm/mach-types.h> 16 16 #include <mach/palmld.h> 17 - #include "soc_common.h" 17 + #include <pcmcia/soc_common.h> 18 18 19 19 static struct gpio palmld_pcmcia_gpios[] = { 20 20 { GPIO_NR_PALMLD_PCMCIA_POWER, GPIOF_INIT_LOW, "PCMCIA Power" },
+2 -2
drivers/pcmcia/pxa2xx_palmtc.c arch/arm/mach-pxa/palmtc-pcmcia.c
··· 14 14 #include <linux/delay.h> 15 15 16 16 #include <asm/mach-types.h> 17 - #include <mach/palmtc.h> 18 - #include "soc_common.h" 17 + #include "palmtc.h" 18 + #include <pcmcia/soc_common.h> 19 19 20 20 static struct gpio palmtc_pcmcia_gpios[] = { 21 21 { GPIO_NR_PALMTC_PCMCIA_POWER1, GPIOF_INIT_LOW, "PCMCIA Power 1" },
+2 -2
drivers/pcmcia/pxa2xx_palmtx.c arch/arm/mach-pxa/palmtx-pcmcia.c
··· 12 12 #include <linux/gpio.h> 13 13 14 14 #include <asm/mach-types.h> 15 - #include <mach/palmtx.h> 16 - #include "soc_common.h" 15 + #include "palmtx.h" 16 + #include <pcmcia/soc_common.h> 17 17 18 18 static struct gpio palmtx_pcmcia_gpios[] = { 19 19 { GPIO_NR_PALMTX_PCMCIA_POWER1, GPIOF_INIT_LOW, "PCMCIA Power 1" },
+1 -1
drivers/pcmcia/pxa2xx_sharpsl.c
··· 18 18 #include <asm/irq.h> 19 19 #include <asm/hardware/scoop.h> 20 20 21 - #include "soc_common.h" 21 + #include <pcmcia/soc_common.h> 22 22 23 23 #define NO_KEEP_VS 0x0001 24 24 #define SCOOP_DEV platform_scoop_config->devs
+2 -2
drivers/pcmcia/pxa2xx_trizeps4.c arch/arm/mach-pxa/trizeps4-pcmcia.c
··· 20 20 #include <asm/irq.h> 21 21 22 22 #include <mach/pxa2xx-regs.h> 23 - #include <mach/trizeps4.h> 23 + #include "trizeps4.h" 24 24 25 - #include "soc_common.h" 25 + #include <pcmcia/soc_common.h> 26 26 27 27 extern void board_pcmcia_power(int power); 28 28
+2 -4
drivers/pcmcia/pxa2xx_viper.c arch/arm/mach-pxa/viper-pcmcia.c
··· 22 22 #include <linux/gpio.h> 23 23 24 24 #include <pcmcia/ss.h> 25 + #include <pcmcia/soc_common.h> 25 26 26 27 #include <asm/irq.h> 27 28 28 - #include <linux/platform_data/pcmcia-pxa2xx_viper.h> 29 - 30 - #include "soc_common.h" 31 - #include "pxa2xx_base.h" 29 + #include "viper-pcmcia.h" 32 30 33 31 static struct platform_device *arcom_pcmcia_dev; 34 32
+2 -2
drivers/pcmcia/pxa2xx_vpac270.c arch/arm/mach-pxa/vpac270-pcmcia.c
··· 13 13 14 14 #include <asm/mach-types.h> 15 15 16 - #include <mach/vpac270.h> 16 + #include "vpac270.h" 17 17 18 - #include "soc_common.h" 18 + #include <pcmcia/soc_common.h> 19 19 20 20 static struct gpio vpac270_pcmcia_gpios[] = { 21 21 { GPIO107_VPAC270_PCMCIA_PPEN, GPIOF_INIT_LOW, "PCMCIA PPEN" },
+1 -119
drivers/pcmcia/soc_common.h
··· 13 13 /* include the world */ 14 14 #include <linux/clk.h> 15 15 #include <linux/cpufreq.h> 16 - #include <pcmcia/ss.h> 17 16 #include <pcmcia/cistpl.h> 18 - 17 + #include <pcmcia/soc_common.h> 19 18 20 19 struct device; 21 20 struct gpio_desc; 22 21 struct pcmcia_low_level; 23 22 struct regulator; 24 23 25 - struct soc_pcmcia_regulator { 26 - struct regulator *reg; 27 - bool on; 28 - }; 29 - 30 - /* 31 - * This structure encapsulates per-socket state which we might need to 32 - * use when responding to a Card Services query of some kind. 33 - */ 34 - struct soc_pcmcia_socket { 35 - struct pcmcia_socket socket; 36 - 37 - /* 38 - * Info from low level handler 39 - */ 40 - unsigned int nr; 41 - struct clk *clk; 42 - 43 - /* 44 - * Core PCMCIA state 45 - */ 46 - const struct pcmcia_low_level *ops; 47 - 48 - unsigned int status; 49 - socket_state_t cs_state; 50 - 51 - unsigned short spd_io[MAX_IO_WIN]; 52 - unsigned short spd_mem[MAX_WIN]; 53 - unsigned short spd_attr[MAX_WIN]; 54 - 55 - struct resource res_skt; 56 - struct resource res_io; 57 - struct resource res_mem; 58 - struct resource res_attr; 59 - void __iomem *virt_io; 60 - 61 - struct { 62 - int gpio; 63 - struct gpio_desc *desc; 64 - unsigned int irq; 65 - const char *name; 66 - } stat[6]; 67 - #define SOC_STAT_CD 0 /* Card detect */ 68 - #define SOC_STAT_BVD1 1 /* BATDEAD / IOSTSCHG */ 69 - #define SOC_STAT_BVD2 2 /* BATWARN / IOSPKR */ 70 - #define SOC_STAT_RDY 3 /* Ready / Interrupt */ 71 - #define SOC_STAT_VS1 4 /* Voltage sense 1 */ 72 - #define SOC_STAT_VS2 5 /* Voltage sense 2 */ 73 - 74 - struct gpio_desc *gpio_reset; 75 - struct gpio_desc *gpio_bus_enable; 76 - struct soc_pcmcia_regulator vcc; 77 - struct soc_pcmcia_regulator vpp; 78 - 79 - unsigned int irq_state; 80 - 81 - #ifdef CONFIG_CPU_FREQ 82 - struct notifier_block cpufreq_nb; 83 - #endif 84 - struct timer_list poll_timer; 85 - struct list_head node; 86 - void *driver_data; 87 - }; 88 - 89 24 struct skt_dev_info { 90 25 int nskt; 91 26 struct soc_pcmcia_socket skt[]; 92 27 }; 93 - 94 - struct pcmcia_state { 95 - unsigned detect: 1, 96 - ready: 1, 97 - bvd1: 1, 98 - bvd2: 1, 99 - wrprot: 1, 100 - vs_3v: 1, 101 - vs_Xv: 1; 102 - }; 103 - 104 - struct pcmcia_low_level { 105 - struct module *owner; 106 - 107 - /* first socket in system */ 108 - int first; 109 - /* nr of sockets */ 110 - int nr; 111 - 112 - int (*hw_init)(struct soc_pcmcia_socket *); 113 - void (*hw_shutdown)(struct soc_pcmcia_socket *); 114 - 115 - void (*socket_state)(struct soc_pcmcia_socket *, struct pcmcia_state *); 116 - int (*configure_socket)(struct soc_pcmcia_socket *, const socket_state_t *); 117 - 118 - /* 119 - * Enable card status IRQs on (re-)initialisation. This can 120 - * be called at initialisation, power management event, or 121 - * pcmcia event. 122 - */ 123 - void (*socket_init)(struct soc_pcmcia_socket *); 124 - 125 - /* 126 - * Disable card status IRQs and PCMCIA bus on suspend. 127 - */ 128 - void (*socket_suspend)(struct soc_pcmcia_socket *); 129 - 130 - /* 131 - * Hardware specific timing routines. 132 - * If provided, the get_timing routine overrides the SOC default. 133 - */ 134 - unsigned int (*get_timing)(struct soc_pcmcia_socket *, unsigned int, unsigned int); 135 - int (*set_timing)(struct soc_pcmcia_socket *); 136 - int (*show_timing)(struct soc_pcmcia_socket *, char *); 137 - 138 - #ifdef CONFIG_CPU_FREQ 139 - /* 140 - * CPUFREQ support. 141 - */ 142 - int (*frequency_change)(struct soc_pcmcia_socket *, unsigned long, struct cpufreq_freqs *); 143 - #endif 144 - }; 145 - 146 28 147 29 struct soc_pcmcia_timing { 148 30 unsigned short io;
include/linux/platform_data/pcmcia-pxa2xx_viper.h arch/arm/mach-pxa/viper-pcmcia.h
+125
include/pcmcia/soc_common.h
··· 1 + /* SPDX-License-Identifier: GPL-2.0 */ 2 + #include <pcmcia/ss.h> 3 + 4 + struct module; 5 + struct cpufreq_freqs; 6 + 7 + struct soc_pcmcia_regulator { 8 + struct regulator *reg; 9 + bool on; 10 + }; 11 + 12 + struct pcmcia_state { 13 + unsigned detect: 1, 14 + ready: 1, 15 + bvd1: 1, 16 + bvd2: 1, 17 + wrprot: 1, 18 + vs_3v: 1, 19 + vs_Xv: 1; 20 + }; 21 + 22 + /* 23 + * This structure encapsulates per-socket state which we might need to 24 + * use when responding to a Card Services query of some kind. 25 + */ 26 + struct soc_pcmcia_socket { 27 + struct pcmcia_socket socket; 28 + 29 + /* 30 + * Info from low level handler 31 + */ 32 + unsigned int nr; 33 + struct clk *clk; 34 + 35 + /* 36 + * Core PCMCIA state 37 + */ 38 + const struct pcmcia_low_level *ops; 39 + 40 + unsigned int status; 41 + socket_state_t cs_state; 42 + 43 + unsigned short spd_io[MAX_IO_WIN]; 44 + unsigned short spd_mem[MAX_WIN]; 45 + unsigned short spd_attr[MAX_WIN]; 46 + 47 + struct resource res_skt; 48 + struct resource res_io; 49 + struct resource res_mem; 50 + struct resource res_attr; 51 + void __iomem *virt_io; 52 + 53 + struct { 54 + int gpio; 55 + struct gpio_desc *desc; 56 + unsigned int irq; 57 + const char *name; 58 + } stat[6]; 59 + #define SOC_STAT_CD 0 /* Card detect */ 60 + #define SOC_STAT_BVD1 1 /* BATDEAD / IOSTSCHG */ 61 + #define SOC_STAT_BVD2 2 /* BATWARN / IOSPKR */ 62 + #define SOC_STAT_RDY 3 /* Ready / Interrupt */ 63 + #define SOC_STAT_VS1 4 /* Voltage sense 1 */ 64 + #define SOC_STAT_VS2 5 /* Voltage sense 2 */ 65 + 66 + struct gpio_desc *gpio_reset; 67 + struct gpio_desc *gpio_bus_enable; 68 + struct soc_pcmcia_regulator vcc; 69 + struct soc_pcmcia_regulator vpp; 70 + 71 + unsigned int irq_state; 72 + 73 + #ifdef CONFIG_CPU_FREQ 74 + struct notifier_block cpufreq_nb; 75 + #endif 76 + struct timer_list poll_timer; 77 + struct list_head node; 78 + void *driver_data; 79 + }; 80 + 81 + 82 + struct pcmcia_low_level { 83 + struct module *owner; 84 + 85 + /* first socket in system */ 86 + int first; 87 + /* nr of sockets */ 88 + int nr; 89 + 90 + int (*hw_init)(struct soc_pcmcia_socket *); 91 + void (*hw_shutdown)(struct soc_pcmcia_socket *); 92 + 93 + void (*socket_state)(struct soc_pcmcia_socket *, struct pcmcia_state *); 94 + int (*configure_socket)(struct soc_pcmcia_socket *, const socket_state_t *); 95 + 96 + /* 97 + * Enable card status IRQs on (re-)initialisation. This can 98 + * be called at initialisation, power management event, or 99 + * pcmcia event. 100 + */ 101 + void (*socket_init)(struct soc_pcmcia_socket *); 102 + 103 + /* 104 + * Disable card status IRQs and PCMCIA bus on suspend. 105 + */ 106 + void (*socket_suspend)(struct soc_pcmcia_socket *); 107 + 108 + /* 109 + * Hardware specific timing routines. 110 + * If provided, the get_timing routine overrides the SOC default. 111 + */ 112 + unsigned int (*get_timing)(struct soc_pcmcia_socket *, unsigned int, unsigned int); 113 + int (*set_timing)(struct soc_pcmcia_socket *); 114 + int (*show_timing)(struct soc_pcmcia_socket *, char *); 115 + 116 + #ifdef CONFIG_CPU_FREQ 117 + /* 118 + * CPUFREQ support. 119 + */ 120 + int (*frequency_change)(struct soc_pcmcia_socket *, unsigned long, struct cpufreq_freqs *); 121 + #endif 122 + }; 123 + 124 + 125 +