]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
ARM: pxa: move pcmcia board data into mach-pxa
authorArnd Bergmann <arnd@arndb.de>
Thu, 28 May 2020 20:57:40 +0000 (22:57 +0200)
committerArnd Bergmann <arnd@arndb.de>
Tue, 19 Apr 2022 19:34:05 +0000 (21:34 +0200)
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>
28 files changed:
arch/arm/mach-pxa/Makefile
arch/arm/mach-pxa/balloon3-pcmcia.c [moved from drivers/pcmcia/pxa2xx_balloon3.c with 98% similarity]
arch/arm/mach-pxa/balloon3.c
arch/arm/mach-pxa/balloon3.h [moved from arch/arm/mach-pxa/include/mach/balloon3.h with 99% similarity]
arch/arm/mach-pxa/colibri-pcmcia.c [moved from drivers/pcmcia/pxa2xx_colibri.c with 99% similarity]
arch/arm/mach-pxa/e740-pcmcia.c [moved from drivers/pcmcia/pxa2xx_e740.c with 98% similarity]
arch/arm/mach-pxa/hx4700-pcmcia.c [moved from drivers/pcmcia/pxa2xx_hx4700.c with 98% similarity]
arch/arm/mach-pxa/palmld-pcmcia.c [moved from drivers/pcmcia/pxa2xx_palmld.c with 98% similarity]
arch/arm/mach-pxa/palmtc-pcmcia.c [moved from drivers/pcmcia/pxa2xx_palmtc.c with 98% similarity]
arch/arm/mach-pxa/palmtc.c
arch/arm/mach-pxa/palmtc.h [moved from arch/arm/mach-pxa/include/mach/palmtc.h with 98% similarity]
arch/arm/mach-pxa/palmtx-pcmcia.c [moved from drivers/pcmcia/pxa2xx_palmtx.c with 98% similarity]
arch/arm/mach-pxa/palmtx.c
arch/arm/mach-pxa/palmtx.h [moved from arch/arm/mach-pxa/include/mach/palmtx.h with 98% similarity]
arch/arm/mach-pxa/trizeps4-pcmcia.c [moved from drivers/pcmcia/pxa2xx_trizeps4.c with 98% similarity]
arch/arm/mach-pxa/trizeps4.c
arch/arm/mach-pxa/trizeps4.h [moved from arch/arm/mach-pxa/include/mach/trizeps4.h with 99% similarity]
arch/arm/mach-pxa/viper-pcmcia.c [moved from drivers/pcmcia/pxa2xx_viper.c with 97% similarity]
arch/arm/mach-pxa/viper-pcmcia.h [moved from include/linux/platform_data/pcmcia-pxa2xx_viper.h with 100% similarity]
arch/arm/mach-pxa/viper.c
arch/arm/mach-pxa/vpac270-pcmcia.c [moved from drivers/pcmcia/pxa2xx_vpac270.c with 98% similarity]
arch/arm/mach-pxa/vpac270.c
arch/arm/mach-pxa/vpac270.h [moved from arch/arm/mach-pxa/include/mach/vpac270.h with 100% similarity]
arch/arm/mach-pxa/zeus.c
drivers/pcmcia/Makefile
drivers/pcmcia/pxa2xx_sharpsl.c
drivers/pcmcia/soc_common.h
include/pcmcia/soc_common.h [new file with mode: 0644]

index 68730ceb8b7cca90d174ae9f8c638855a49c8443..0aec36e67dc1139648f1ae29793b329b42c1c9e4 100644 (file)
@@ -37,7 +37,8 @@ obj-$(CONFIG_MACH_SAAR)               += saar.o
 obj-$(CONFIG_ARCH_PXA_IDP)     += idp.o
 obj-$(CONFIG_ARCH_VIPER)       += viper.o
 obj-$(CONFIG_MACH_ARCOM_ZEUS)  += zeus.o
-obj-$(CONFIG_MACH_BALLOON3)    += balloon3.o
+obj-$(CONFIG_ARCOM_PCMCIA)     += viper-pcmcia.o
+obj-$(CONFIG_MACH_BALLOON3)    += balloon3.o balloon3-pcmcia.o
 obj-$(CONFIG_MACH_CSB726)      += csb726.o
 obj-$(CONFIG_CSB726_CSB701)    += csb701.o
 obj-$(CONFIG_MACH_CM_X300)      += cm-x300.o
@@ -47,18 +48,20 @@ obj-$(CONFIG_GUMSTIX_AM200EPD)      += am200epd.o
 obj-$(CONFIG_GUMSTIX_AM300EPD) += am300epd.o
 obj-$(CONFIG_MACH_XCEP)         += xcep.o
 obj-$(CONFIG_MACH_TRIZEPS4)    += trizeps4.o
+obj-$(CONFIG_TRIZEPS_PCMCIA)   += trizeps4-pcmcia.o
 obj-$(CONFIG_MACH_LOGICPD_PXA270)      += lpd270.o
 obj-$(CONFIG_MACH_PCM027)              += pcm027.o
 obj-$(CONFIG_MACH_PCM990_BASEBOARD)    += pcm990-baseboard.o
-obj-$(CONFIG_MACH_COLIBRI)                     += colibri-pxa270.o
+obj-$(CONFIG_MACH_COLIBRI)             += colibri-pxa270.o colibri-pcmcia.o
 obj-$(CONFIG_MACH_COLIBRI_EVALBOARD)   += colibri-evalboard.o
 obj-$(CONFIG_MACH_COLIBRI_PXA270_INCOME)       += colibri-pxa270-income.o
 obj-$(CONFIG_MACH_COLIBRI300)  += colibri-pxa3xx.o colibri-pxa300.o
-obj-$(CONFIG_MACH_COLIBRI320)  += colibri-pxa3xx.o colibri-pxa320.o
-obj-$(CONFIG_MACH_VPAC270)     += vpac270.o
+obj-$(CONFIG_MACH_COLIBRI320)  += colibri-pxa3xx.o colibri-pxa320.o colibri-pcmcia.o
+obj-$(CONFIG_MACH_VPAC270)     += vpac270.o vpac270-pcmcia.o
 
 # End-user Products
 obj-$(CONFIG_MACH_H4700)       += hx4700.o
+obj-$(CONFIG_MACH_H4700)       += hx4700-pcmcia.o
 obj-$(CONFIG_MACH_H5000)       += h5000.o
 obj-$(CONFIG_MACH_HIMALAYA)    += himalaya.o
 obj-$(CONFIG_MACH_MAGICIAN)    += magician.o
@@ -66,12 +69,12 @@ obj-$(CONFIG_MACH_MIOA701)  += mioa701.o mioa701_bootresume.o
 obj-$(CONFIG_PXA_EZX)           += ezx.o
 obj-$(CONFIG_MACH_MP900C)      += mp900.o
 obj-$(CONFIG_MACH_PALMTE2)     += palmte2.o
-obj-$(CONFIG_MACH_PALMTC)      += palmtc.o
+obj-$(CONFIG_MACH_PALMTC)      += palmtc.o palmtc-pcmcia.o
 obj-$(CONFIG_MACH_PALM27X)     += palm27x.o
 obj-$(CONFIG_MACH_PALMT5)      += palmt5.o
-obj-$(CONFIG_MACH_PALMTX)      += palmtx.o
+obj-$(CONFIG_MACH_PALMTX)      += palmtx.o palmtx-pcmcia.o
 obj-$(CONFIG_MACH_PALMZ72)     += palmz72.o
-obj-$(CONFIG_MACH_PALMLD)      += palmld.o
+obj-$(CONFIG_MACH_PALMLD)      += palmld.o palmld-pcmcia.o
 obj-$(CONFIG_PALM_TREO)                += palmtreo.o
 obj-$(CONFIG_PXA_SHARP_C7xx)   += corgi.o sharpsl_pm.o corgi_pm.o
 obj-$(CONFIG_PXA_SHARP_Cxx00)  += spitz.o sharpsl_pm.o spitz_pm.o
@@ -79,6 +82,7 @@ obj-$(CONFIG_MACH_POODLE)     += poodle.o
 obj-$(CONFIG_MACH_TOSA)                += tosa.o
 obj-$(CONFIG_MACH_ICONTROL)     += icontrol.o mxm8x10.o
 obj-$(CONFIG_ARCH_PXA_ESERIES) += eseries.o
+obj-$(CONFIG_MACH_E740)                += e740-pcmcia.o
 obj-$(CONFIG_MACH_ZIPIT2)      += z2.o
 
 obj-$(CONFIG_PXA_SYSTEMS_CPLDS)        += pxa_cplds_irqs.o
similarity index 98%
rename from drivers/pcmcia/pxa2xx_balloon3.c
rename to arch/arm/mach-pxa/balloon3-pcmcia.c
index 5fe1da7a50e4af43d1894e6dc4ab853c0ebf91fb..6a27b76cc6038c8f327fba24f99ba55b839e34f2 100644 (file)
 #include <linux/irq.h>
 #include <linux/io.h>
 
-#include <mach/balloon3.h>
+#include "balloon3.h"
 
 #include <asm/mach-types.h>
 
-#include "soc_common.h"
+#include <pcmcia/soc_common.h>
 
 static int balloon3_pcmcia_hw_init(struct soc_pcmcia_socket *skt)
 {
index 82f9299f67d30a4829381df01de87275dfcf99d8..896d47d9a8dc081b654bc089aea360bed7a3bdb0 100644 (file)
@@ -40,7 +40,7 @@
 #include <asm/mach/flash.h>
 
 #include "pxa27x.h"
-#include <mach/balloon3.h>
+#include "balloon3.h"
 #include <linux/platform_data/asoc-pxa.h>
 #include <linux/platform_data/video-pxafb.h>
 #include <linux/platform_data/mmc-pxamci.h>
similarity index 99%
rename from arch/arm/mach-pxa/include/mach/balloon3.h
rename to arch/arm/mach-pxa/balloon3.h
index 04f3639c408293de8f8b99745b961172db785de4..f351358c0e5bd7873c172661c49c5cab96dacd73 100644 (file)
@@ -11,7 +11,7 @@
 #ifndef ASM_ARCH_BALLOON3_H
 #define ASM_ARCH_BALLOON3_H
 
-#include "irqs.h" /* PXA_NR_BUILTIN_GPIO */
+#include <mach/irqs.h> /* PXA_NR_BUILTIN_GPIO */
 
 enum balloon3_features {
        BALLOON3_FEATURE_OHCI,
similarity index 99%
rename from drivers/pcmcia/pxa2xx_colibri.c
rename to arch/arm/mach-pxa/colibri-pcmcia.c
index f0f725e996044b1077cb4fff04c2b773f5182ef6..9da7b478e5eba25621458832b76826e722579d55 100644 (file)
@@ -14,7 +14,7 @@
 
 #include <asm/mach-types.h>
 
-#include "soc_common.h"
+#include <pcmcia/soc_common.h>
 
 #define        COLIBRI270_RESET_GPIO   53
 #define        COLIBRI270_PPEN_GPIO    107
similarity index 98%
rename from drivers/pcmcia/pxa2xx_e740.c
rename to arch/arm/mach-pxa/e740-pcmcia.c
index 72caa6d05ab99d5ebaad276d29886f58532e0f4f..133535d7ac0509d96563235d544d5653aac89bd1 100644 (file)
@@ -18,7 +18,7 @@
 #include <asm/irq.h>
 #include <asm/mach-types.h>
 
-#include "soc_common.h"
+#include <pcmcia/soc_common.h>
 
 static int e740_pcmcia_hw_init(struct soc_pcmcia_socket *skt)
 {
similarity index 98%
rename from drivers/pcmcia/pxa2xx_hx4700.c
rename to arch/arm/mach-pxa/hx4700-pcmcia.c
index 87b6a1639d948d12f6ebfc57bbf629ffed711f26..e8acbfc9ef6c4f4b5a63334ce5e8b994b1bfdcd8 100644 (file)
@@ -12,7 +12,7 @@
 #include <asm/mach-types.h>
 #include <mach/hx4700.h>
 
-#include "soc_common.h"
+#include <pcmcia/soc_common.h>
 
 static struct gpio gpios[] = {
        { GPIO114_HX4700_CF_RESET,    GPIOF_OUT_INIT_LOW,   "CF reset"        },
similarity index 98%
rename from drivers/pcmcia/pxa2xx_palmld.c
rename to arch/arm/mach-pxa/palmld-pcmcia.c
index cfff41ac9ca29e47b594759241ef577528698785..07e0f7438db183e6ffb3b5bea3adef418bf4bb4b 100644 (file)
@@ -14,7 +14,7 @@
 
 #include <asm/mach-types.h>
 #include <mach/palmld.h>
-#include "soc_common.h"
+#include <pcmcia/soc_common.h>
 
 static struct gpio palmld_pcmcia_gpios[] = {
        { GPIO_NR_PALMLD_PCMCIA_POWER,  GPIOF_INIT_LOW, "PCMCIA Power" },
similarity index 98%
rename from drivers/pcmcia/pxa2xx_palmtc.c
rename to arch/arm/mach-pxa/palmtc-pcmcia.c
index 8fe05613ed043655ce063f41cf0a7fc77261618e..8e3f382343fec9f83b0aacc08d96ae064cebffb0 100644 (file)
@@ -14,8 +14,8 @@
 #include <linux/delay.h>
 
 #include <asm/mach-types.h>
-#include <mach/palmtc.h>
-#include "soc_common.h"
+#include "palmtc.h"
+#include <pcmcia/soc_common.h>
 
 static struct gpio palmtc_pcmcia_gpios[] = {
        { GPIO_NR_PALMTC_PCMCIA_POWER1, GPIOF_INIT_LOW, "PCMCIA Power 1" },
index c59fc76c0c3de1d41d5e24ea0c8d99c2ac2c9af6..3054ffa397ad5e8b19da2f4858845d1298a45dd3 100644 (file)
@@ -30,7 +30,7 @@
 
 #include "pxa25x.h"
 #include <linux/platform_data/asoc-pxa.h>
-#include <mach/palmtc.h>
+#include "palmtc.h"
 #include <linux/platform_data/mmc-pxamci.h>
 #include <linux/platform_data/video-pxafb.h>
 #include <linux/platform_data/irda-pxaficp.h>
similarity index 98%
rename from arch/arm/mach-pxa/include/mach/palmtc.h
rename to arch/arm/mach-pxa/palmtc.h
index 9257a02c46e50cd85a1effb8317a26a67b02ba15..afec057c28574b9de2e6f64e20f0a2c571e433b6 100644 (file)
@@ -12,7 +12,7 @@
 #ifndef _INCLUDE_PALMTC_H_
 #define _INCLUDE_PALMTC_H_
 
-#include "irqs.h" /* PXA_GPIO_TO_IRQ */
+#include <mach/irqs.h> /* PXA_GPIO_TO_IRQ */
 
 /** HERE ARE GPIOs **/
 
similarity index 98%
rename from drivers/pcmcia/pxa2xx_palmtx.c
rename to arch/arm/mach-pxa/palmtx-pcmcia.c
index c449ca72cb87a88c667f8924a237bf5eea1c8933..8c2aaad93043ef8d33b8104e96e03849879ad9b4 100644 (file)
@@ -12,8 +12,8 @@
 #include <linux/gpio.h>
 
 #include <asm/mach-types.h>
-#include <mach/palmtx.h>
-#include "soc_common.h"
+#include "palmtx.h"
+#include <pcmcia/soc_common.h>
 
 static struct gpio palmtx_pcmcia_gpios[] = {
        { GPIO_NR_PALMTX_PCMCIA_POWER1, GPIOF_INIT_LOW, "PCMCIA Power 1" },
index 097b88638863e65167513fc9ca04a8be7b757244..86460d6ea721cf825a7647f1c3f49b1e48854c1f 100644 (file)
@@ -33,7 +33,7 @@
 
 #include "pxa27x.h"
 #include <linux/platform_data/asoc-pxa.h>
-#include <mach/palmtx.h>
+#include "palmtx.h"
 #include <linux/platform_data/mmc-pxamci.h>
 #include <linux/platform_data/video-pxafb.h>
 #include <linux/platform_data/irda-pxaficp.h>
similarity index 98%
rename from arch/arm/mach-pxa/include/mach/palmtx.h
rename to arch/arm/mach-pxa/palmtx.h
index ec88abf0fc6c5dbb1da67d34836c217ece90b893..a2bb993952d91609a10c129e00a607d6a581d400 100644 (file)
@@ -12,7 +12,7 @@
 #ifndef _INCLUDE_PALMTX_H_
 #define _INCLUDE_PALMTX_H_
 
-#include "irqs.h" /* PXA_GPIO_TO_IRQ */
+#include <mach/irqs.h> /* PXA_GPIO_TO_IRQ */
 
 /** HERE ARE GPIOs **/
 
similarity index 98%
rename from drivers/pcmcia/pxa2xx_trizeps4.c
rename to arch/arm/mach-pxa/trizeps4-pcmcia.c
index 6db8fe880ed464a9a2082259ee4d1628736f6efc..02d7bb0c538f0f82b7f752aced55ef8aad89d883 100644 (file)
@@ -20,9 +20,9 @@
 #include <asm/irq.h>
 
 #include <mach/pxa2xx-regs.h>
-#include <mach/trizeps4.h>
+#include "trizeps4.h"
 
-#include "soc_common.h"
+#include <pcmcia/soc_common.h>
 
 extern void board_pcmcia_power(int power);
 
index 1337008cc76095f07c8f78e46c85e6621eda5ac0..fadfbb40cd6ca0582825eb62dfe8ec350b973995 100644 (file)
@@ -40,7 +40,7 @@
 #include <asm/mach/flash.h>
 
 #include "pxa27x.h"
-#include <mach/trizeps4.h>
+#include "trizeps4.h"
 #include <linux/platform_data/asoc-pxa.h>
 #include <linux/platform_data/video-pxafb.h>
 #include <linux/platform_data/mmc-pxamci.h>
similarity index 99%
rename from arch/arm/mach-pxa/include/mach/trizeps4.h
rename to arch/arm/mach-pxa/trizeps4.h
index 27926629f9c689688741eb44fc14eae31a0add1f..7597b9de11e24e02eedaf21a77727414b38464eb 100644 (file)
@@ -12,7 +12,7 @@
 #define _TRIPEPS4_H_
 
 #include <mach/addr-map.h>
-#include "irqs.h" /* PXA_GPIO_TO_IRQ */
+#include <mach/irqs.h> /* PXA_GPIO_TO_IRQ */
 
 /* physical memory regions */
 #define TRIZEPS4_FLASH_PHYS    (PXA_CS0_PHYS)  /* Flash region */
similarity index 97%
rename from drivers/pcmcia/pxa2xx_viper.c
rename to arch/arm/mach-pxa/viper-pcmcia.c
index 7ac6647d286eb326933dcd9028bb5b9badf3271c..26599dcc49b39155b88dd5a26385e6add06a4b5e 100644 (file)
 #include <linux/gpio.h>
 
 #include <pcmcia/ss.h>
+#include <pcmcia/soc_common.h>
 
 #include <asm/irq.h>
 
-#include <linux/platform_data/pcmcia-pxa2xx_viper.h>
-
-#include "soc_common.h"
-#include "pxa2xx_base.h"
+#include "viper-pcmcia.h"
 
 static struct platform_device *arcom_pcmcia_dev;
 
index ac94b10bf8c1842d49c8a9a861e1529a79b90c7b..600d9e80b00c52a6ecd47071700e08529c81c581 100644 (file)
@@ -49,7 +49,7 @@
 #include <linux/platform_data/asoc-pxa.h>
 #include <linux/platform_data/video-pxafb.h>
 #include "regs-uart.h"
-#include <linux/platform_data/pcmcia-pxa2xx_viper.h>
+#include "viper-pcmcia.h"
 #include "viper.h"
 
 #include <asm/setup.h>
similarity index 98%
rename from drivers/pcmcia/pxa2xx_vpac270.c
rename to arch/arm/mach-pxa/vpac270-pcmcia.c
index 3565add03a5e8aa18a5c6c6364c2c0bfc6d633cc..9fd990c8a5fb6e000805a301954d7631f5b3b509 100644 (file)
@@ -13,9 +13,9 @@
 
 #include <asm/mach-types.h>
 
-#include <mach/vpac270.h>
+#include "vpac270.h"
 
-#include "soc_common.h"
+#include <pcmcia/soc_common.h>
 
 static struct gpio vpac270_pcmcia_gpios[] = {
        { GPIO107_VPAC270_PCMCIA_PPEN,  GPIOF_INIT_LOW, "PCMCIA PPEN" },
index 7067d14646891879c5df3e8785670e9dc3c3d351..8f74bafcf1f9eb8c435f3a3de2197afb4af69570 100644 (file)
@@ -30,7 +30,7 @@
 
 #include "pxa27x.h"
 #include <linux/platform_data/asoc-pxa.h>
-#include <mach/vpac270.h>
+#include "vpac270.h"
 #include <linux/platform_data/mmc-pxamci.h>
 #include <linux/platform_data/video-pxafb.h>
 #include <linux/platform_data/usb-ohci-pxa27x.h>
index 67396e85bb66fcd2ee897a1786e7e4c1e3819ef2..2e6c8d156d7725d34aa7779cf195ed3508142b8b 100644 (file)
@@ -47,7 +47,7 @@
 #include <linux/platform_data/video-pxafb.h>
 #include "pm.h"
 #include <linux/platform_data/asoc-pxa.h>
-#include <linux/platform_data/pcmcia-pxa2xx_viper.h>
+#include "viper-pcmcia.h"
 #include "zeus.h"
 #include <mach/smemc.h>
 
index c43267b18f55bdde7ec6f3b26f1381a6727022f8..c59ddde42007d8de5e53eecc2a53eba453023ae2 100644 (file)
@@ -50,18 +50,5 @@ sa1100_cs-$(CONFIG_SA1100_SIMPAD)            += sa1100_simpad.o
 
 pxa2xx-obj-$(CONFIG_MACH_MAINSTONE)            += pxa2xx_mainstone.o
 pxa2xx-obj-$(CONFIG_PXA_SHARPSL)               += pxa2xx_sharpsl.o
-pxa2xx-obj-$(CONFIG_ARCOM_PCMCIA)              += pxa2xx_viper.o
-pxa2xx-obj-$(CONFIG_TRIZEPS_PCMCIA)            += pxa2xx_trizeps4.o
-pxa2xx-obj-$(CONFIG_MACH_PALMTX)               += pxa2xx_palmtx.o
-pxa2xx-obj-$(CONFIG_MACH_PALMTC)               += pxa2xx_palmtc.o
-pxa2xx-obj-$(CONFIG_MACH_PALMLD)               += pxa2xx_palmld.o
-pxa2xx-obj-$(CONFIG_MACH_E740)                 += pxa2xx_e740.o
-pxa2xx-obj-$(CONFIG_MACH_VPAC270)              += pxa2xx_vpac270.o
-pxa2xx-obj-$(CONFIG_MACH_BALLOON3)             += pxa2xx_balloon3.o
-pxa2xx-obj-$(CONFIG_MACH_COLIBRI)              += pxa2xx_colibri.o
-pxa2xx-obj-$(CONFIG_MACH_COLIBRI320)           += pxa2xx_colibri.o
-pxa2xx-obj-$(CONFIG_MACH_H4700)                        += pxa2xx_hx4700.o
-
 obj-$(CONFIG_PCMCIA_PXA2XX)                    += pxa2xx_base.o $(pxa2xx-obj-y)
-
 obj-$(CONFIG_PCMCIA_XXS1500)                   += xxs1500_ss.o
index 66fe1d1af12a7bc0ad89ae50323edec9275f84c4..b3ba858f70cb9e7ac67d88f8abfa275b60738e97 100644 (file)
@@ -18,7 +18,7 @@
 #include <asm/irq.h>
 #include <asm/hardware/scoop.h>
 
-#include "soc_common.h"
+#include <pcmcia/soc_common.h>
 
 #define        NO_KEEP_VS 0x0001
 #define SCOOP_DEV platform_scoop_config->devs
index 222e81c793658d7032f4f0f227abe24b5c88938d..17ef05aa8afed3c39db017b571b7b87759f553d5 100644 (file)
 /* include the world */
 #include <linux/clk.h>
 #include <linux/cpufreq.h>
-#include <pcmcia/ss.h>
 #include <pcmcia/cistpl.h>
-
+#include <pcmcia/soc_common.h>
 
 struct device;
 struct gpio_desc;
 struct pcmcia_low_level;
 struct regulator;
 
-struct soc_pcmcia_regulator {
-       struct regulator        *reg;
-       bool                    on;
-};
-
-/*
- * This structure encapsulates per-socket state which we might need to
- * use when responding to a Card Services query of some kind.
- */
-struct soc_pcmcia_socket {
-       struct pcmcia_socket    socket;
-
-       /*
-        * Info from low level handler
-        */
-       unsigned int            nr;
-       struct clk              *clk;
-
-       /*
-        * Core PCMCIA state
-        */
-       const struct pcmcia_low_level *ops;
-
-       unsigned int            status;
-       socket_state_t          cs_state;
-
-       unsigned short          spd_io[MAX_IO_WIN];
-       unsigned short          spd_mem[MAX_WIN];
-       unsigned short          spd_attr[MAX_WIN];
-
-       struct resource         res_skt;
-       struct resource         res_io;
-       struct resource         res_mem;
-       struct resource         res_attr;
-       void __iomem            *virt_io;
-
-       struct {
-               int             gpio;
-               struct gpio_desc *desc;
-               unsigned int    irq;
-               const char      *name;
-       } stat[6];
-#define SOC_STAT_CD            0       /* Card detect */
-#define SOC_STAT_BVD1          1       /* BATDEAD / IOSTSCHG */
-#define SOC_STAT_BVD2          2       /* BATWARN / IOSPKR */
-#define SOC_STAT_RDY           3       /* Ready / Interrupt */
-#define SOC_STAT_VS1           4       /* Voltage sense 1 */
-#define SOC_STAT_VS2           5       /* Voltage sense 2 */
-
-       struct gpio_desc        *gpio_reset;
-       struct gpio_desc        *gpio_bus_enable;
-       struct soc_pcmcia_regulator vcc;
-       struct soc_pcmcia_regulator vpp;
-
-       unsigned int            irq_state;
-
-#ifdef CONFIG_CPU_FREQ
-       struct notifier_block   cpufreq_nb;
-#endif
-       struct timer_list       poll_timer;
-       struct list_head        node;
-       void *driver_data;
-};
-
 struct skt_dev_info {
        int nskt;
        struct soc_pcmcia_socket skt[];
 };
 
-struct pcmcia_state {
-  unsigned detect: 1,
-            ready: 1,
-             bvd1: 1,
-             bvd2: 1,
-           wrprot: 1,
-            vs_3v: 1,
-            vs_Xv: 1;
-};
-
-struct pcmcia_low_level {
-       struct module *owner;
-
-       /* first socket in system */
-       int first;
-       /* nr of sockets */
-       int nr;
-
-       int (*hw_init)(struct soc_pcmcia_socket *);
-       void (*hw_shutdown)(struct soc_pcmcia_socket *);
-
-       void (*socket_state)(struct soc_pcmcia_socket *, struct pcmcia_state *);
-       int (*configure_socket)(struct soc_pcmcia_socket *, const socket_state_t *);
-
-       /*
-        * Enable card status IRQs on (re-)initialisation.  This can
-        * be called at initialisation, power management event, or
-        * pcmcia event.
-        */
-       void (*socket_init)(struct soc_pcmcia_socket *);
-
-       /*
-        * Disable card status IRQs and PCMCIA bus on suspend.
-        */
-       void (*socket_suspend)(struct soc_pcmcia_socket *);
-
-       /*
-        * Hardware specific timing routines.
-        * If provided, the get_timing routine overrides the SOC default.
-        */
-       unsigned int (*get_timing)(struct soc_pcmcia_socket *, unsigned int, unsigned int);
-       int (*set_timing)(struct soc_pcmcia_socket *);
-       int (*show_timing)(struct soc_pcmcia_socket *, char *);
-
-#ifdef CONFIG_CPU_FREQ
-       /*
-        * CPUFREQ support.
-        */
-       int (*frequency_change)(struct soc_pcmcia_socket *, unsigned long, struct cpufreq_freqs *);
-#endif
-};
-
-
 struct soc_pcmcia_timing {
        unsigned short io;
        unsigned short mem;
diff --git a/include/pcmcia/soc_common.h b/include/pcmcia/soc_common.h
new file mode 100644 (file)
index 0000000..26f1473
--- /dev/null
@@ -0,0 +1,125 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+#include <pcmcia/ss.h>
+
+struct module;
+struct cpufreq_freqs;
+
+struct soc_pcmcia_regulator {
+       struct regulator        *reg;
+       bool                    on;
+};
+
+struct pcmcia_state {
+  unsigned detect: 1,
+            ready: 1,
+             bvd1: 1,
+             bvd2: 1,
+           wrprot: 1,
+            vs_3v: 1,
+            vs_Xv: 1;
+};
+
+/*
+ * This structure encapsulates per-socket state which we might need to
+ * use when responding to a Card Services query of some kind.
+ */
+struct soc_pcmcia_socket {
+       struct pcmcia_socket    socket;
+
+       /*
+        * Info from low level handler
+        */
+       unsigned int            nr;
+       struct clk              *clk;
+
+       /*
+        * Core PCMCIA state
+        */
+       const struct pcmcia_low_level *ops;
+
+       unsigned int            status;
+       socket_state_t          cs_state;
+
+       unsigned short          spd_io[MAX_IO_WIN];
+       unsigned short          spd_mem[MAX_WIN];
+       unsigned short          spd_attr[MAX_WIN];
+
+       struct resource         res_skt;
+       struct resource         res_io;
+       struct resource         res_mem;
+       struct resource         res_attr;
+       void __iomem            *virt_io;
+
+       struct {
+               int             gpio;
+               struct gpio_desc *desc;
+               unsigned int    irq;
+               const char      *name;
+       } stat[6];
+#define SOC_STAT_CD            0       /* Card detect */
+#define SOC_STAT_BVD1          1       /* BATDEAD / IOSTSCHG */
+#define SOC_STAT_BVD2          2       /* BATWARN / IOSPKR */
+#define SOC_STAT_RDY           3       /* Ready / Interrupt */
+#define SOC_STAT_VS1           4       /* Voltage sense 1 */
+#define SOC_STAT_VS2           5       /* Voltage sense 2 */
+
+       struct gpio_desc        *gpio_reset;
+       struct gpio_desc        *gpio_bus_enable;
+       struct soc_pcmcia_regulator vcc;
+       struct soc_pcmcia_regulator vpp;
+
+       unsigned int            irq_state;
+
+#ifdef CONFIG_CPU_FREQ
+       struct notifier_block   cpufreq_nb;
+#endif
+       struct timer_list       poll_timer;
+       struct list_head        node;
+       void *driver_data;
+};
+
+
+struct pcmcia_low_level {
+       struct module *owner;
+
+       /* first socket in system */
+       int first;
+       /* nr of sockets */
+       int nr;
+
+       int (*hw_init)(struct soc_pcmcia_socket *);
+       void (*hw_shutdown)(struct soc_pcmcia_socket *);
+
+       void (*socket_state)(struct soc_pcmcia_socket *, struct pcmcia_state *);
+       int (*configure_socket)(struct soc_pcmcia_socket *, const socket_state_t *);
+
+       /*
+        * Enable card status IRQs on (re-)initialisation.  This can
+        * be called at initialisation, power management event, or
+        * pcmcia event.
+        */
+       void (*socket_init)(struct soc_pcmcia_socket *);
+
+       /*
+        * Disable card status IRQs and PCMCIA bus on suspend.
+        */
+       void (*socket_suspend)(struct soc_pcmcia_socket *);
+
+       /*
+        * Hardware specific timing routines.
+        * If provided, the get_timing routine overrides the SOC default.
+        */
+       unsigned int (*get_timing)(struct soc_pcmcia_socket *, unsigned int, unsigned int);
+       int (*set_timing)(struct soc_pcmcia_socket *);
+       int (*show_timing)(struct soc_pcmcia_socket *, char *);
+
+#ifdef CONFIG_CPU_FREQ
+       /*
+        * CPUFREQ support.
+        */
+       int (*frequency_change)(struct soc_pcmcia_socket *, unsigned long, struct cpufreq_freqs *);
+#endif
+};
+
+
+