From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 0FF9CC433F5 for ; Tue, 19 Apr 2022 16:40:21 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 4FADA10EF86; Tue, 19 Apr 2022 16:40:20 +0000 (UTC) Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by gabe.freedesktop.org (Postfix) with ESMTPS id 2891710EF86 for ; Tue, 19 Apr 2022 16:40:19 +0000 (UTC) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 9B1DA61851; Tue, 19 Apr 2022 16:40:18 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id F07FCC385A7; Tue, 19 Apr 2022 16:40:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1650386418; bh=6i8ruhF5Ltjl7b0QsDur4Rd2y+D+UB0Sp+r6bnt5gQ0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=CCsceejaZuNc9CJNA+MQ2k2xKeeJqb6phUacnpMoDIkA40dFT0MU/JGr78yh30HfS jaucL3U+hl7WXJevmndk2k0fPmlOU+c0kJ7DB7/bUsy+0uCdUMLNXviU9ByIrZR7Y6 wKgZ0JWPTZOdDk8Jgq5iqtibJhz0MQ4O0TcrDj4jwYCIPMEE+WvuH24kKaFJN62tBK APB8S9FZ/JaVltcwc5L9kTs4pIz/sWaJ47MLKcbN+MQVQfAa7koWJGCvhCy7D2JBzQ 2vNTGJ6CkUlZNDWaJbvfQRsr7zVHXwG1+xpUbOsvv8K0IY6V83OhdH8mzsYQEIF+TG 4ea44N5+GI1Eg== From: Arnd Bergmann To: robert.jarzmik@free.fr, linux-arm-kernel@lists.infradead.org Subject: [PATCH 11/48] ARM: pxa: move pcmcia board data into mach-pxa Date: Tue, 19 Apr 2022 18:37:33 +0200 Message-Id: <20220419163810.2118169-12-arnd@kernel.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20220419163810.2118169-1-arnd@kernel.org> References: <20220419163810.2118169-1-arnd@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Ulf Hansson , linux-usb@vger.kernel.org, "Rafael J. Wysocki" , Viresh Kumar , linux-fbdev@vger.kernel.org, Dominik Brodowski , linux-mips@vger.kernel.org, linux-ide@vger.kernel.org, linux-mtd@lists.infradead.org, Jonathan Cameron , Tomas Cech , linux-clk@vger.kernel.org, linux-leds@vger.kernel.org, linux-rtc@vger.kernel.org, Helge Deller , Marek Vasut , Paul Parsons , Sergey Lapin , Arnd Bergmann , linux-pm@vger.kernel.org, linux-input@vger.kernel.org, Haojian Zhuang , Lubomir Rintel , Mark Brown , dri-devel@lists.freedesktop.org, Thomas Bogendoerfer , Stephen Boyd , patches@opensource.cirrus.com, Dmitry Torokhov , linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org, Michael Turquette , alsa-devel@alsa-project.org, Daniel Mack Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" From: Arnd Bergmann 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 Cc: Dominik Brodowski Cc: Jonathan Cameron Signed-off-by: Arnd Bergmann --- arch/arm/mach-pxa/Makefile | 18 ++- .../arm/mach-pxa/balloon3-pcmcia.c | 4 +- arch/arm/mach-pxa/balloon3.c | 2 +- .../mach-pxa/{include/mach => }/balloon3.h | 2 +- .../arm/mach-pxa/colibri-pcmcia.c | 2 +- .../arm/mach-pxa/e740-pcmcia.c | 2 +- .../arm/mach-pxa/hx4700-pcmcia.c | 2 +- .../arm/mach-pxa/palmld-pcmcia.c | 2 +- .../arm/mach-pxa/palmtc-pcmcia.c | 4 +- arch/arm/mach-pxa/palmtc.c | 2 +- arch/arm/mach-pxa/{include/mach => }/palmtc.h | 2 +- .../arm/mach-pxa/palmtx-pcmcia.c | 4 +- arch/arm/mach-pxa/palmtx.c | 2 +- arch/arm/mach-pxa/{include/mach => }/palmtx.h | 2 +- .../arm/mach-pxa/trizeps4-pcmcia.c | 4 +- arch/arm/mach-pxa/trizeps4.c | 2 +- .../mach-pxa/{include/mach => }/trizeps4.h | 2 +- .../arm/mach-pxa/viper-pcmcia.c | 6 +- .../arm/mach-pxa/viper-pcmcia.h | 0 arch/arm/mach-pxa/viper.c | 2 +- .../arm/mach-pxa/vpac270-pcmcia.c | 4 +- arch/arm/mach-pxa/vpac270.c | 2 +- .../arm/mach-pxa/{include/mach => }/vpac270.h | 0 arch/arm/mach-pxa/zeus.c | 2 +- drivers/pcmcia/Makefile | 13 -- drivers/pcmcia/pxa2xx_sharpsl.c | 2 +- drivers/pcmcia/soc_common.h | 120 +---------------- include/pcmcia/soc_common.h | 125 ++++++++++++++++++ 28 files changed, 165 insertions(+), 169 deletions(-) rename drivers/pcmcia/pxa2xx_balloon3.c => arch/arm/mach-pxa/balloon3-pcmcia.c (98%) rename arch/arm/mach-pxa/{include/mach => }/balloon3.h (99%) rename drivers/pcmcia/pxa2xx_colibri.c => arch/arm/mach-pxa/colibri-pcmcia.c (99%) rename drivers/pcmcia/pxa2xx_e740.c => arch/arm/mach-pxa/e740-pcmcia.c (98%) rename drivers/pcmcia/pxa2xx_hx4700.c => arch/arm/mach-pxa/hx4700-pcmcia.c (98%) rename drivers/pcmcia/pxa2xx_palmld.c => arch/arm/mach-pxa/palmld-pcmcia.c (98%) rename drivers/pcmcia/pxa2xx_palmtc.c => arch/arm/mach-pxa/palmtc-pcmcia.c (98%) rename arch/arm/mach-pxa/{include/mach => }/palmtc.h (98%) rename drivers/pcmcia/pxa2xx_palmtx.c => arch/arm/mach-pxa/palmtx-pcmcia.c (98%) rename arch/arm/mach-pxa/{include/mach => }/palmtx.h (98%) rename drivers/pcmcia/pxa2xx_trizeps4.c => arch/arm/mach-pxa/trizeps4-pcmcia.c (98%) rename arch/arm/mach-pxa/{include/mach => }/trizeps4.h (99%) rename drivers/pcmcia/pxa2xx_viper.c => arch/arm/mach-pxa/viper-pcmcia.c (97%) rename include/linux/platform_data/pcmcia-pxa2xx_viper.h => arch/arm/mach-pxa/viper-pcmcia.h (100%) rename drivers/pcmcia/pxa2xx_vpac270.c => arch/arm/mach-pxa/vpac270-pcmcia.c (98%) rename arch/arm/mach-pxa/{include/mach => }/vpac270.h (100%) create mode 100644 include/pcmcia/soc_common.h diff --git a/arch/arm/mach-pxa/Makefile b/arch/arm/mach-pxa/Makefile index 68730ceb8b7c..0aec36e67dc1 100644 --- a/arch/arm/mach-pxa/Makefile +++ b/arch/arm/mach-pxa/Makefile @@ -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 diff --git a/drivers/pcmcia/pxa2xx_balloon3.c b/arch/arm/mach-pxa/balloon3-pcmcia.c similarity index 98% rename from drivers/pcmcia/pxa2xx_balloon3.c rename to arch/arm/mach-pxa/balloon3-pcmcia.c index 5fe1da7a50e4..6a27b76cc603 100644 --- a/drivers/pcmcia/pxa2xx_balloon3.c +++ b/arch/arm/mach-pxa/balloon3-pcmcia.c @@ -20,11 +20,11 @@ #include #include -#include +#include "balloon3.h" #include -#include "soc_common.h" +#include static int balloon3_pcmcia_hw_init(struct soc_pcmcia_socket *skt) { diff --git a/arch/arm/mach-pxa/balloon3.c b/arch/arm/mach-pxa/balloon3.c index 82f9299f67d3..896d47d9a8dc 100644 --- a/arch/arm/mach-pxa/balloon3.c +++ b/arch/arm/mach-pxa/balloon3.c @@ -40,7 +40,7 @@ #include #include "pxa27x.h" -#include +#include "balloon3.h" #include #include #include diff --git a/arch/arm/mach-pxa/include/mach/balloon3.h b/arch/arm/mach-pxa/balloon3.h similarity index 99% rename from arch/arm/mach-pxa/include/mach/balloon3.h rename to arch/arm/mach-pxa/balloon3.h index 04f3639c4082..f351358c0e5b 100644 --- a/arch/arm/mach-pxa/include/mach/balloon3.h +++ b/arch/arm/mach-pxa/balloon3.h @@ -11,7 +11,7 @@ #ifndef ASM_ARCH_BALLOON3_H #define ASM_ARCH_BALLOON3_H -#include "irqs.h" /* PXA_NR_BUILTIN_GPIO */ +#include /* PXA_NR_BUILTIN_GPIO */ enum balloon3_features { BALLOON3_FEATURE_OHCI, diff --git a/drivers/pcmcia/pxa2xx_colibri.c b/arch/arm/mach-pxa/colibri-pcmcia.c similarity index 99% rename from drivers/pcmcia/pxa2xx_colibri.c rename to arch/arm/mach-pxa/colibri-pcmcia.c index f0f725e99604..9da7b478e5eb 100644 --- a/drivers/pcmcia/pxa2xx_colibri.c +++ b/arch/arm/mach-pxa/colibri-pcmcia.c @@ -14,7 +14,7 @@ #include -#include "soc_common.h" +#include #define COLIBRI270_RESET_GPIO 53 #define COLIBRI270_PPEN_GPIO 107 diff --git a/drivers/pcmcia/pxa2xx_e740.c b/arch/arm/mach-pxa/e740-pcmcia.c similarity index 98% rename from drivers/pcmcia/pxa2xx_e740.c rename to arch/arm/mach-pxa/e740-pcmcia.c index 72caa6d05ab9..133535d7ac05 100644 --- a/drivers/pcmcia/pxa2xx_e740.c +++ b/arch/arm/mach-pxa/e740-pcmcia.c @@ -18,7 +18,7 @@ #include #include -#include "soc_common.h" +#include static int e740_pcmcia_hw_init(struct soc_pcmcia_socket *skt) { diff --git a/drivers/pcmcia/pxa2xx_hx4700.c b/arch/arm/mach-pxa/hx4700-pcmcia.c similarity index 98% rename from drivers/pcmcia/pxa2xx_hx4700.c rename to arch/arm/mach-pxa/hx4700-pcmcia.c index 87b6a1639d94..e8acbfc9ef6c 100644 --- a/drivers/pcmcia/pxa2xx_hx4700.c +++ b/arch/arm/mach-pxa/hx4700-pcmcia.c @@ -12,7 +12,7 @@ #include #include -#include "soc_common.h" +#include static struct gpio gpios[] = { { GPIO114_HX4700_CF_RESET, GPIOF_OUT_INIT_LOW, "CF reset" }, diff --git a/drivers/pcmcia/pxa2xx_palmld.c b/arch/arm/mach-pxa/palmld-pcmcia.c similarity index 98% rename from drivers/pcmcia/pxa2xx_palmld.c rename to arch/arm/mach-pxa/palmld-pcmcia.c index cfff41ac9ca2..07e0f7438db1 100644 --- a/drivers/pcmcia/pxa2xx_palmld.c +++ b/arch/arm/mach-pxa/palmld-pcmcia.c @@ -14,7 +14,7 @@ #include #include -#include "soc_common.h" +#include static struct gpio palmld_pcmcia_gpios[] = { { GPIO_NR_PALMLD_PCMCIA_POWER, GPIOF_INIT_LOW, "PCMCIA Power" }, diff --git a/drivers/pcmcia/pxa2xx_palmtc.c b/arch/arm/mach-pxa/palmtc-pcmcia.c similarity index 98% rename from drivers/pcmcia/pxa2xx_palmtc.c rename to arch/arm/mach-pxa/palmtc-pcmcia.c index 8fe05613ed04..8e3f382343fe 100644 --- a/drivers/pcmcia/pxa2xx_palmtc.c +++ b/arch/arm/mach-pxa/palmtc-pcmcia.c @@ -14,8 +14,8 @@ #include #include -#include -#include "soc_common.h" +#include "palmtc.h" +#include static struct gpio palmtc_pcmcia_gpios[] = { { GPIO_NR_PALMTC_PCMCIA_POWER1, GPIOF_INIT_LOW, "PCMCIA Power 1" }, diff --git a/arch/arm/mach-pxa/palmtc.c b/arch/arm/mach-pxa/palmtc.c index c59fc76c0c3d..3054ffa397ad 100644 --- a/arch/arm/mach-pxa/palmtc.c +++ b/arch/arm/mach-pxa/palmtc.c @@ -30,7 +30,7 @@ #include "pxa25x.h" #include -#include +#include "palmtc.h" #include #include #include diff --git a/arch/arm/mach-pxa/include/mach/palmtc.h b/arch/arm/mach-pxa/palmtc.h similarity index 98% rename from arch/arm/mach-pxa/include/mach/palmtc.h rename to arch/arm/mach-pxa/palmtc.h index 9257a02c46e5..afec057c2857 100644 --- a/arch/arm/mach-pxa/include/mach/palmtc.h +++ b/arch/arm/mach-pxa/palmtc.h @@ -12,7 +12,7 @@ #ifndef _INCLUDE_PALMTC_H_ #define _INCLUDE_PALMTC_H_ -#include "irqs.h" /* PXA_GPIO_TO_IRQ */ +#include /* PXA_GPIO_TO_IRQ */ /** HERE ARE GPIOs **/ diff --git a/drivers/pcmcia/pxa2xx_palmtx.c b/arch/arm/mach-pxa/palmtx-pcmcia.c similarity index 98% rename from drivers/pcmcia/pxa2xx_palmtx.c rename to arch/arm/mach-pxa/palmtx-pcmcia.c index c449ca72cb87..8c2aaad93043 100644 --- a/drivers/pcmcia/pxa2xx_palmtx.c +++ b/arch/arm/mach-pxa/palmtx-pcmcia.c @@ -12,8 +12,8 @@ #include #include -#include -#include "soc_common.h" +#include "palmtx.h" +#include static struct gpio palmtx_pcmcia_gpios[] = { { GPIO_NR_PALMTX_PCMCIA_POWER1, GPIOF_INIT_LOW, "PCMCIA Power 1" }, diff --git a/arch/arm/mach-pxa/palmtx.c b/arch/arm/mach-pxa/palmtx.c index 097b88638863..86460d6ea721 100644 --- a/arch/arm/mach-pxa/palmtx.c +++ b/arch/arm/mach-pxa/palmtx.c @@ -33,7 +33,7 @@ #include "pxa27x.h" #include -#include +#include "palmtx.h" #include #include #include diff --git a/arch/arm/mach-pxa/include/mach/palmtx.h b/arch/arm/mach-pxa/palmtx.h similarity index 98% rename from arch/arm/mach-pxa/include/mach/palmtx.h rename to arch/arm/mach-pxa/palmtx.h index ec88abf0fc6c..a2bb993952d9 100644 --- a/arch/arm/mach-pxa/include/mach/palmtx.h +++ b/arch/arm/mach-pxa/palmtx.h @@ -12,7 +12,7 @@ #ifndef _INCLUDE_PALMTX_H_ #define _INCLUDE_PALMTX_H_ -#include "irqs.h" /* PXA_GPIO_TO_IRQ */ +#include /* PXA_GPIO_TO_IRQ */ /** HERE ARE GPIOs **/ diff --git a/drivers/pcmcia/pxa2xx_trizeps4.c b/arch/arm/mach-pxa/trizeps4-pcmcia.c similarity index 98% rename from drivers/pcmcia/pxa2xx_trizeps4.c rename to arch/arm/mach-pxa/trizeps4-pcmcia.c index 6db8fe880ed4..02d7bb0c538f 100644 --- a/drivers/pcmcia/pxa2xx_trizeps4.c +++ b/arch/arm/mach-pxa/trizeps4-pcmcia.c @@ -20,9 +20,9 @@ #include #include -#include +#include "trizeps4.h" -#include "soc_common.h" +#include extern void board_pcmcia_power(int power); diff --git a/arch/arm/mach-pxa/trizeps4.c b/arch/arm/mach-pxa/trizeps4.c index 1337008cc760..fadfbb40cd6c 100644 --- a/arch/arm/mach-pxa/trizeps4.c +++ b/arch/arm/mach-pxa/trizeps4.c @@ -40,7 +40,7 @@ #include #include "pxa27x.h" -#include +#include "trizeps4.h" #include #include #include diff --git a/arch/arm/mach-pxa/include/mach/trizeps4.h b/arch/arm/mach-pxa/trizeps4.h similarity index 99% rename from arch/arm/mach-pxa/include/mach/trizeps4.h rename to arch/arm/mach-pxa/trizeps4.h index 27926629f9c6..7597b9de11e2 100644 --- a/arch/arm/mach-pxa/include/mach/trizeps4.h +++ b/arch/arm/mach-pxa/trizeps4.h @@ -12,7 +12,7 @@ #define _TRIPEPS4_H_ #include -#include "irqs.h" /* PXA_GPIO_TO_IRQ */ +#include /* PXA_GPIO_TO_IRQ */ /* physical memory regions */ #define TRIZEPS4_FLASH_PHYS (PXA_CS0_PHYS) /* Flash region */ diff --git a/drivers/pcmcia/pxa2xx_viper.c b/arch/arm/mach-pxa/viper-pcmcia.c similarity index 97% rename from drivers/pcmcia/pxa2xx_viper.c rename to arch/arm/mach-pxa/viper-pcmcia.c index 7ac6647d286e..26599dcc49b3 100644 --- a/drivers/pcmcia/pxa2xx_viper.c +++ b/arch/arm/mach-pxa/viper-pcmcia.c @@ -22,13 +22,11 @@ #include #include +#include #include -#include - -#include "soc_common.h" -#include "pxa2xx_base.h" +#include "viper-pcmcia.h" static struct platform_device *arcom_pcmcia_dev; diff --git a/include/linux/platform_data/pcmcia-pxa2xx_viper.h b/arch/arm/mach-pxa/viper-pcmcia.h similarity index 100% rename from include/linux/platform_data/pcmcia-pxa2xx_viper.h rename to arch/arm/mach-pxa/viper-pcmcia.h diff --git a/arch/arm/mach-pxa/viper.c b/arch/arm/mach-pxa/viper.c index ac94b10bf8c1..600d9e80b00c 100644 --- a/arch/arm/mach-pxa/viper.c +++ b/arch/arm/mach-pxa/viper.c @@ -49,7 +49,7 @@ #include #include #include "regs-uart.h" -#include +#include "viper-pcmcia.h" #include "viper.h" #include diff --git a/drivers/pcmcia/pxa2xx_vpac270.c b/arch/arm/mach-pxa/vpac270-pcmcia.c similarity index 98% rename from drivers/pcmcia/pxa2xx_vpac270.c rename to arch/arm/mach-pxa/vpac270-pcmcia.c index 3565add03a5e..9fd990c8a5fb 100644 --- a/drivers/pcmcia/pxa2xx_vpac270.c +++ b/arch/arm/mach-pxa/vpac270-pcmcia.c @@ -13,9 +13,9 @@ #include -#include +#include "vpac270.h" -#include "soc_common.h" +#include static struct gpio vpac270_pcmcia_gpios[] = { { GPIO107_VPAC270_PCMCIA_PPEN, GPIOF_INIT_LOW, "PCMCIA PPEN" }, diff --git a/arch/arm/mach-pxa/vpac270.c b/arch/arm/mach-pxa/vpac270.c index 7067d1464689..8f74bafcf1f9 100644 --- a/arch/arm/mach-pxa/vpac270.c +++ b/arch/arm/mach-pxa/vpac270.c @@ -30,7 +30,7 @@ #include "pxa27x.h" #include -#include +#include "vpac270.h" #include #include #include diff --git a/arch/arm/mach-pxa/include/mach/vpac270.h b/arch/arm/mach-pxa/vpac270.h similarity index 100% rename from arch/arm/mach-pxa/include/mach/vpac270.h rename to arch/arm/mach-pxa/vpac270.h diff --git a/arch/arm/mach-pxa/zeus.c b/arch/arm/mach-pxa/zeus.c index 67396e85bb66..2e6c8d156d77 100644 --- a/arch/arm/mach-pxa/zeus.c +++ b/arch/arm/mach-pxa/zeus.c @@ -47,7 +47,7 @@ #include #include "pm.h" #include -#include +#include "viper-pcmcia.h" #include "zeus.h" #include diff --git a/drivers/pcmcia/Makefile b/drivers/pcmcia/Makefile index c43267b18f55..c59ddde42007 100644 --- a/drivers/pcmcia/Makefile +++ b/drivers/pcmcia/Makefile @@ -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 diff --git a/drivers/pcmcia/pxa2xx_sharpsl.c b/drivers/pcmcia/pxa2xx_sharpsl.c index 66fe1d1af12a..b3ba858f70cb 100644 --- a/drivers/pcmcia/pxa2xx_sharpsl.c +++ b/drivers/pcmcia/pxa2xx_sharpsl.c @@ -18,7 +18,7 @@ #include #include -#include "soc_common.h" +#include #define NO_KEEP_VS 0x0001 #define SCOOP_DEV platform_scoop_config->devs diff --git a/drivers/pcmcia/soc_common.h b/drivers/pcmcia/soc_common.h index 222e81c79365..17ef05aa8afe 100644 --- a/drivers/pcmcia/soc_common.h +++ b/drivers/pcmcia/soc_common.h @@ -13,137 +13,19 @@ /* include the world */ #include #include -#include #include - +#include 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 index 000000000000..26f1473a06c5 --- /dev/null +++ b/include/pcmcia/soc_common.h @@ -0,0 +1,125 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +#include + +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 +}; + + + -- 2.29.2 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7C7CCC4707A for ; Tue, 19 Apr 2022 16:44:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1352218AbiDSQos (ORCPT ); Tue, 19 Apr 2022 12:44:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53302 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1355010AbiDSQnE (ORCPT ); Tue, 19 Apr 2022 12:43:04 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6C03015FDD; Tue, 19 Apr 2022 09:40:19 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 04803616B9; Tue, 19 Apr 2022 16:40:19 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id F07FCC385A7; Tue, 19 Apr 2022 16:40:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1650386418; bh=6i8ruhF5Ltjl7b0QsDur4Rd2y+D+UB0Sp+r6bnt5gQ0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=CCsceejaZuNc9CJNA+MQ2k2xKeeJqb6phUacnpMoDIkA40dFT0MU/JGr78yh30HfS jaucL3U+hl7WXJevmndk2k0fPmlOU+c0kJ7DB7/bUsy+0uCdUMLNXviU9ByIrZR7Y6 wKgZ0JWPTZOdDk8Jgq5iqtibJhz0MQ4O0TcrDj4jwYCIPMEE+WvuH24kKaFJN62tBK APB8S9FZ/JaVltcwc5L9kTs4pIz/sWaJ47MLKcbN+MQVQfAa7koWJGCvhCy7D2JBzQ 2vNTGJ6CkUlZNDWaJbvfQRsr7zVHXwG1+xpUbOsvv8K0IY6V83OhdH8mzsYQEIF+TG 4ea44N5+GI1Eg== From: Arnd Bergmann To: robert.jarzmik@free.fr, linux-arm-kernel@lists.infradead.org Cc: Arnd Bergmann , Daniel Mack , Haojian Zhuang , Marek Vasut , Philipp Zabel , Lubomir Rintel , Paul Parsons , Tomas Cech , Sergey Lapin , Thomas Bogendoerfer , Michael Turquette , Stephen Boyd , "Rafael J. Wysocki" , Viresh Kumar , Dmitry Torokhov , Ulf Hansson , Dominik Brodowski , Helge Deller , Mark Brown , Linus Walleij , linux-kernel@vger.kernel.org, linux-mips@vger.kernel.org, linux-ide@vger.kernel.org, linux-clk@vger.kernel.org, linux-pm@vger.kernel.org, linux-input@vger.kernel.org, patches@opensource.cirrus.com, linux-leds@vger.kernel.org, linux-mmc@vger.kernel.org, linux-mtd@lists.infradead.org, linux-rtc@vger.kernel.org, linux-usb@vger.kernel.org, linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org, alsa-devel@alsa-project.org, Jonathan Cameron Subject: [PATCH 11/48] ARM: pxa: move pcmcia board data into mach-pxa Date: Tue, 19 Apr 2022 18:37:33 +0200 Message-Id: <20220419163810.2118169-12-arnd@kernel.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20220419163810.2118169-1-arnd@kernel.org> References: <20220419163810.2118169-1-arnd@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-leds@vger.kernel.org From: Arnd Bergmann 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 Cc: Dominik Brodowski Cc: Jonathan Cameron Signed-off-by: Arnd Bergmann --- arch/arm/mach-pxa/Makefile | 18 ++- .../arm/mach-pxa/balloon3-pcmcia.c | 4 +- arch/arm/mach-pxa/balloon3.c | 2 +- .../mach-pxa/{include/mach => }/balloon3.h | 2 +- .../arm/mach-pxa/colibri-pcmcia.c | 2 +- .../arm/mach-pxa/e740-pcmcia.c | 2 +- .../arm/mach-pxa/hx4700-pcmcia.c | 2 +- .../arm/mach-pxa/palmld-pcmcia.c | 2 +- .../arm/mach-pxa/palmtc-pcmcia.c | 4 +- arch/arm/mach-pxa/palmtc.c | 2 +- arch/arm/mach-pxa/{include/mach => }/palmtc.h | 2 +- .../arm/mach-pxa/palmtx-pcmcia.c | 4 +- arch/arm/mach-pxa/palmtx.c | 2 +- arch/arm/mach-pxa/{include/mach => }/palmtx.h | 2 +- .../arm/mach-pxa/trizeps4-pcmcia.c | 4 +- arch/arm/mach-pxa/trizeps4.c | 2 +- .../mach-pxa/{include/mach => }/trizeps4.h | 2 +- .../arm/mach-pxa/viper-pcmcia.c | 6 +- .../arm/mach-pxa/viper-pcmcia.h | 0 arch/arm/mach-pxa/viper.c | 2 +- .../arm/mach-pxa/vpac270-pcmcia.c | 4 +- arch/arm/mach-pxa/vpac270.c | 2 +- .../arm/mach-pxa/{include/mach => }/vpac270.h | 0 arch/arm/mach-pxa/zeus.c | 2 +- drivers/pcmcia/Makefile | 13 -- drivers/pcmcia/pxa2xx_sharpsl.c | 2 +- drivers/pcmcia/soc_common.h | 120 +---------------- include/pcmcia/soc_common.h | 125 ++++++++++++++++++ 28 files changed, 165 insertions(+), 169 deletions(-) rename drivers/pcmcia/pxa2xx_balloon3.c => arch/arm/mach-pxa/balloon3-pcmcia.c (98%) rename arch/arm/mach-pxa/{include/mach => }/balloon3.h (99%) rename drivers/pcmcia/pxa2xx_colibri.c => arch/arm/mach-pxa/colibri-pcmcia.c (99%) rename drivers/pcmcia/pxa2xx_e740.c => arch/arm/mach-pxa/e740-pcmcia.c (98%) rename drivers/pcmcia/pxa2xx_hx4700.c => arch/arm/mach-pxa/hx4700-pcmcia.c (98%) rename drivers/pcmcia/pxa2xx_palmld.c => arch/arm/mach-pxa/palmld-pcmcia.c (98%) rename drivers/pcmcia/pxa2xx_palmtc.c => arch/arm/mach-pxa/palmtc-pcmcia.c (98%) rename arch/arm/mach-pxa/{include/mach => }/palmtc.h (98%) rename drivers/pcmcia/pxa2xx_palmtx.c => arch/arm/mach-pxa/palmtx-pcmcia.c (98%) rename arch/arm/mach-pxa/{include/mach => }/palmtx.h (98%) rename drivers/pcmcia/pxa2xx_trizeps4.c => arch/arm/mach-pxa/trizeps4-pcmcia.c (98%) rename arch/arm/mach-pxa/{include/mach => }/trizeps4.h (99%) rename drivers/pcmcia/pxa2xx_viper.c => arch/arm/mach-pxa/viper-pcmcia.c (97%) rename include/linux/platform_data/pcmcia-pxa2xx_viper.h => arch/arm/mach-pxa/viper-pcmcia.h (100%) rename drivers/pcmcia/pxa2xx_vpac270.c => arch/arm/mach-pxa/vpac270-pcmcia.c (98%) rename arch/arm/mach-pxa/{include/mach => }/vpac270.h (100%) create mode 100644 include/pcmcia/soc_common.h diff --git a/arch/arm/mach-pxa/Makefile b/arch/arm/mach-pxa/Makefile index 68730ceb8b7c..0aec36e67dc1 100644 --- a/arch/arm/mach-pxa/Makefile +++ b/arch/arm/mach-pxa/Makefile @@ -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 diff --git a/drivers/pcmcia/pxa2xx_balloon3.c b/arch/arm/mach-pxa/balloon3-pcmcia.c similarity index 98% rename from drivers/pcmcia/pxa2xx_balloon3.c rename to arch/arm/mach-pxa/balloon3-pcmcia.c index 5fe1da7a50e4..6a27b76cc603 100644 --- a/drivers/pcmcia/pxa2xx_balloon3.c +++ b/arch/arm/mach-pxa/balloon3-pcmcia.c @@ -20,11 +20,11 @@ #include #include -#include +#include "balloon3.h" #include -#include "soc_common.h" +#include static int balloon3_pcmcia_hw_init(struct soc_pcmcia_socket *skt) { diff --git a/arch/arm/mach-pxa/balloon3.c b/arch/arm/mach-pxa/balloon3.c index 82f9299f67d3..896d47d9a8dc 100644 --- a/arch/arm/mach-pxa/balloon3.c +++ b/arch/arm/mach-pxa/balloon3.c @@ -40,7 +40,7 @@ #include #include "pxa27x.h" -#include +#include "balloon3.h" #include #include #include diff --git a/arch/arm/mach-pxa/include/mach/balloon3.h b/arch/arm/mach-pxa/balloon3.h similarity index 99% rename from arch/arm/mach-pxa/include/mach/balloon3.h rename to arch/arm/mach-pxa/balloon3.h index 04f3639c4082..f351358c0e5b 100644 --- a/arch/arm/mach-pxa/include/mach/balloon3.h +++ b/arch/arm/mach-pxa/balloon3.h @@ -11,7 +11,7 @@ #ifndef ASM_ARCH_BALLOON3_H #define ASM_ARCH_BALLOON3_H -#include "irqs.h" /* PXA_NR_BUILTIN_GPIO */ +#include /* PXA_NR_BUILTIN_GPIO */ enum balloon3_features { BALLOON3_FEATURE_OHCI, diff --git a/drivers/pcmcia/pxa2xx_colibri.c b/arch/arm/mach-pxa/colibri-pcmcia.c similarity index 99% rename from drivers/pcmcia/pxa2xx_colibri.c rename to arch/arm/mach-pxa/colibri-pcmcia.c index f0f725e99604..9da7b478e5eb 100644 --- a/drivers/pcmcia/pxa2xx_colibri.c +++ b/arch/arm/mach-pxa/colibri-pcmcia.c @@ -14,7 +14,7 @@ #include -#include "soc_common.h" +#include #define COLIBRI270_RESET_GPIO 53 #define COLIBRI270_PPEN_GPIO 107 diff --git a/drivers/pcmcia/pxa2xx_e740.c b/arch/arm/mach-pxa/e740-pcmcia.c similarity index 98% rename from drivers/pcmcia/pxa2xx_e740.c rename to arch/arm/mach-pxa/e740-pcmcia.c index 72caa6d05ab9..133535d7ac05 100644 --- a/drivers/pcmcia/pxa2xx_e740.c +++ b/arch/arm/mach-pxa/e740-pcmcia.c @@ -18,7 +18,7 @@ #include #include -#include "soc_common.h" +#include static int e740_pcmcia_hw_init(struct soc_pcmcia_socket *skt) { diff --git a/drivers/pcmcia/pxa2xx_hx4700.c b/arch/arm/mach-pxa/hx4700-pcmcia.c similarity index 98% rename from drivers/pcmcia/pxa2xx_hx4700.c rename to arch/arm/mach-pxa/hx4700-pcmcia.c index 87b6a1639d94..e8acbfc9ef6c 100644 --- a/drivers/pcmcia/pxa2xx_hx4700.c +++ b/arch/arm/mach-pxa/hx4700-pcmcia.c @@ -12,7 +12,7 @@ #include #include -#include "soc_common.h" +#include static struct gpio gpios[] = { { GPIO114_HX4700_CF_RESET, GPIOF_OUT_INIT_LOW, "CF reset" }, diff --git a/drivers/pcmcia/pxa2xx_palmld.c b/arch/arm/mach-pxa/palmld-pcmcia.c similarity index 98% rename from drivers/pcmcia/pxa2xx_palmld.c rename to arch/arm/mach-pxa/palmld-pcmcia.c index cfff41ac9ca2..07e0f7438db1 100644 --- a/drivers/pcmcia/pxa2xx_palmld.c +++ b/arch/arm/mach-pxa/palmld-pcmcia.c @@ -14,7 +14,7 @@ #include #include -#include "soc_common.h" +#include static struct gpio palmld_pcmcia_gpios[] = { { GPIO_NR_PALMLD_PCMCIA_POWER, GPIOF_INIT_LOW, "PCMCIA Power" }, diff --git a/drivers/pcmcia/pxa2xx_palmtc.c b/arch/arm/mach-pxa/palmtc-pcmcia.c similarity index 98% rename from drivers/pcmcia/pxa2xx_palmtc.c rename to arch/arm/mach-pxa/palmtc-pcmcia.c index 8fe05613ed04..8e3f382343fe 100644 --- a/drivers/pcmcia/pxa2xx_palmtc.c +++ b/arch/arm/mach-pxa/palmtc-pcmcia.c @@ -14,8 +14,8 @@ #include #include -#include -#include "soc_common.h" +#include "palmtc.h" +#include static struct gpio palmtc_pcmcia_gpios[] = { { GPIO_NR_PALMTC_PCMCIA_POWER1, GPIOF_INIT_LOW, "PCMCIA Power 1" }, diff --git a/arch/arm/mach-pxa/palmtc.c b/arch/arm/mach-pxa/palmtc.c index c59fc76c0c3d..3054ffa397ad 100644 --- a/arch/arm/mach-pxa/palmtc.c +++ b/arch/arm/mach-pxa/palmtc.c @@ -30,7 +30,7 @@ #include "pxa25x.h" #include -#include +#include "palmtc.h" #include #include #include diff --git a/arch/arm/mach-pxa/include/mach/palmtc.h b/arch/arm/mach-pxa/palmtc.h similarity index 98% rename from arch/arm/mach-pxa/include/mach/palmtc.h rename to arch/arm/mach-pxa/palmtc.h index 9257a02c46e5..afec057c2857 100644 --- a/arch/arm/mach-pxa/include/mach/palmtc.h +++ b/arch/arm/mach-pxa/palmtc.h @@ -12,7 +12,7 @@ #ifndef _INCLUDE_PALMTC_H_ #define _INCLUDE_PALMTC_H_ -#include "irqs.h" /* PXA_GPIO_TO_IRQ */ +#include /* PXA_GPIO_TO_IRQ */ /** HERE ARE GPIOs **/ diff --git a/drivers/pcmcia/pxa2xx_palmtx.c b/arch/arm/mach-pxa/palmtx-pcmcia.c similarity index 98% rename from drivers/pcmcia/pxa2xx_palmtx.c rename to arch/arm/mach-pxa/palmtx-pcmcia.c index c449ca72cb87..8c2aaad93043 100644 --- a/drivers/pcmcia/pxa2xx_palmtx.c +++ b/arch/arm/mach-pxa/palmtx-pcmcia.c @@ -12,8 +12,8 @@ #include #include -#include -#include "soc_common.h" +#include "palmtx.h" +#include static struct gpio palmtx_pcmcia_gpios[] = { { GPIO_NR_PALMTX_PCMCIA_POWER1, GPIOF_INIT_LOW, "PCMCIA Power 1" }, diff --git a/arch/arm/mach-pxa/palmtx.c b/arch/arm/mach-pxa/palmtx.c index 097b88638863..86460d6ea721 100644 --- a/arch/arm/mach-pxa/palmtx.c +++ b/arch/arm/mach-pxa/palmtx.c @@ -33,7 +33,7 @@ #include "pxa27x.h" #include -#include +#include "palmtx.h" #include #include #include diff --git a/arch/arm/mach-pxa/include/mach/palmtx.h b/arch/arm/mach-pxa/palmtx.h similarity index 98% rename from arch/arm/mach-pxa/include/mach/palmtx.h rename to arch/arm/mach-pxa/palmtx.h index ec88abf0fc6c..a2bb993952d9 100644 --- a/arch/arm/mach-pxa/include/mach/palmtx.h +++ b/arch/arm/mach-pxa/palmtx.h @@ -12,7 +12,7 @@ #ifndef _INCLUDE_PALMTX_H_ #define _INCLUDE_PALMTX_H_ -#include "irqs.h" /* PXA_GPIO_TO_IRQ */ +#include /* PXA_GPIO_TO_IRQ */ /** HERE ARE GPIOs **/ diff --git a/drivers/pcmcia/pxa2xx_trizeps4.c b/arch/arm/mach-pxa/trizeps4-pcmcia.c similarity index 98% rename from drivers/pcmcia/pxa2xx_trizeps4.c rename to arch/arm/mach-pxa/trizeps4-pcmcia.c index 6db8fe880ed4..02d7bb0c538f 100644 --- a/drivers/pcmcia/pxa2xx_trizeps4.c +++ b/arch/arm/mach-pxa/trizeps4-pcmcia.c @@ -20,9 +20,9 @@ #include #include -#include +#include "trizeps4.h" -#include "soc_common.h" +#include extern void board_pcmcia_power(int power); diff --git a/arch/arm/mach-pxa/trizeps4.c b/arch/arm/mach-pxa/trizeps4.c index 1337008cc760..fadfbb40cd6c 100644 --- a/arch/arm/mach-pxa/trizeps4.c +++ b/arch/arm/mach-pxa/trizeps4.c @@ -40,7 +40,7 @@ #include #include "pxa27x.h" -#include +#include "trizeps4.h" #include #include #include diff --git a/arch/arm/mach-pxa/include/mach/trizeps4.h b/arch/arm/mach-pxa/trizeps4.h similarity index 99% rename from arch/arm/mach-pxa/include/mach/trizeps4.h rename to arch/arm/mach-pxa/trizeps4.h index 27926629f9c6..7597b9de11e2 100644 --- a/arch/arm/mach-pxa/include/mach/trizeps4.h +++ b/arch/arm/mach-pxa/trizeps4.h @@ -12,7 +12,7 @@ #define _TRIPEPS4_H_ #include -#include "irqs.h" /* PXA_GPIO_TO_IRQ */ +#include /* PXA_GPIO_TO_IRQ */ /* physical memory regions */ #define TRIZEPS4_FLASH_PHYS (PXA_CS0_PHYS) /* Flash region */ diff --git a/drivers/pcmcia/pxa2xx_viper.c b/arch/arm/mach-pxa/viper-pcmcia.c similarity index 97% rename from drivers/pcmcia/pxa2xx_viper.c rename to arch/arm/mach-pxa/viper-pcmcia.c index 7ac6647d286e..26599dcc49b3 100644 --- a/drivers/pcmcia/pxa2xx_viper.c +++ b/arch/arm/mach-pxa/viper-pcmcia.c @@ -22,13 +22,11 @@ #include #include +#include #include -#include - -#include "soc_common.h" -#include "pxa2xx_base.h" +#include "viper-pcmcia.h" static struct platform_device *arcom_pcmcia_dev; diff --git a/include/linux/platform_data/pcmcia-pxa2xx_viper.h b/arch/arm/mach-pxa/viper-pcmcia.h similarity index 100% rename from include/linux/platform_data/pcmcia-pxa2xx_viper.h rename to arch/arm/mach-pxa/viper-pcmcia.h diff --git a/arch/arm/mach-pxa/viper.c b/arch/arm/mach-pxa/viper.c index ac94b10bf8c1..600d9e80b00c 100644 --- a/arch/arm/mach-pxa/viper.c +++ b/arch/arm/mach-pxa/viper.c @@ -49,7 +49,7 @@ #include #include #include "regs-uart.h" -#include +#include "viper-pcmcia.h" #include "viper.h" #include diff --git a/drivers/pcmcia/pxa2xx_vpac270.c b/arch/arm/mach-pxa/vpac270-pcmcia.c similarity index 98% rename from drivers/pcmcia/pxa2xx_vpac270.c rename to arch/arm/mach-pxa/vpac270-pcmcia.c index 3565add03a5e..9fd990c8a5fb 100644 --- a/drivers/pcmcia/pxa2xx_vpac270.c +++ b/arch/arm/mach-pxa/vpac270-pcmcia.c @@ -13,9 +13,9 @@ #include -#include +#include "vpac270.h" -#include "soc_common.h" +#include static struct gpio vpac270_pcmcia_gpios[] = { { GPIO107_VPAC270_PCMCIA_PPEN, GPIOF_INIT_LOW, "PCMCIA PPEN" }, diff --git a/arch/arm/mach-pxa/vpac270.c b/arch/arm/mach-pxa/vpac270.c index 7067d1464689..8f74bafcf1f9 100644 --- a/arch/arm/mach-pxa/vpac270.c +++ b/arch/arm/mach-pxa/vpac270.c @@ -30,7 +30,7 @@ #include "pxa27x.h" #include -#include +#include "vpac270.h" #include #include #include diff --git a/arch/arm/mach-pxa/include/mach/vpac270.h b/arch/arm/mach-pxa/vpac270.h similarity index 100% rename from arch/arm/mach-pxa/include/mach/vpac270.h rename to arch/arm/mach-pxa/vpac270.h diff --git a/arch/arm/mach-pxa/zeus.c b/arch/arm/mach-pxa/zeus.c index 67396e85bb66..2e6c8d156d77 100644 --- a/arch/arm/mach-pxa/zeus.c +++ b/arch/arm/mach-pxa/zeus.c @@ -47,7 +47,7 @@ #include #include "pm.h" #include -#include +#include "viper-pcmcia.h" #include "zeus.h" #include diff --git a/drivers/pcmcia/Makefile b/drivers/pcmcia/Makefile index c43267b18f55..c59ddde42007 100644 --- a/drivers/pcmcia/Makefile +++ b/drivers/pcmcia/Makefile @@ -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 diff --git a/drivers/pcmcia/pxa2xx_sharpsl.c b/drivers/pcmcia/pxa2xx_sharpsl.c index 66fe1d1af12a..b3ba858f70cb 100644 --- a/drivers/pcmcia/pxa2xx_sharpsl.c +++ b/drivers/pcmcia/pxa2xx_sharpsl.c @@ -18,7 +18,7 @@ #include #include -#include "soc_common.h" +#include #define NO_KEEP_VS 0x0001 #define SCOOP_DEV platform_scoop_config->devs diff --git a/drivers/pcmcia/soc_common.h b/drivers/pcmcia/soc_common.h index 222e81c79365..17ef05aa8afe 100644 --- a/drivers/pcmcia/soc_common.h +++ b/drivers/pcmcia/soc_common.h @@ -13,137 +13,19 @@ /* include the world */ #include #include -#include #include - +#include 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 index 000000000000..26f1473a06c5 --- /dev/null +++ b/include/pcmcia/soc_common.h @@ -0,0 +1,125 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +#include + +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 +}; + + + -- 2.29.2 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 7C95BC433EF for ; Tue, 19 Apr 2022 16:51:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=GSjSkvCafgLLUo7dkvzsWN4dD81/8TbUTRcZq8FzvSI=; b=AsnoqQDzrkR9RJ Cs1qpE6tK9qZKcptHaqOYs10oJmRo4LYubc4rF/5FdkPUt8EuT4vS8Cv7WULEP9/TPMFca9swbyB/ iNn4+6U28C2FALGCOI7C7MEgLT6dEiKHQlb5ryNYD+qZR+VqRgXf+ryr3wL0PDWTyP7XRqobXXfTm yv9hqzcbu6trnsYiPktnugoHj5wrZNF2gRajLl2wafl9rXUhaxOx2AnZhbDA9Yno1fyi/iQKgpZbs TzOGYCYZETkiLVkTFcwcV7X77rWCQiWx4F2EIUSQv16LG+0kbl8Qs7BGHnQYgpUawLNsnR3N64v5D ew2v7lvyxdUKDVBnwMiA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ngr41-0051q2-Qa; Tue, 19 Apr 2022 16:50:54 +0000 Received: from dfw.source.kernel.org ([2604:1380:4641:c500::1]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1ngqtn-004wMf-4k; Tue, 19 Apr 2022 16:40:27 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 9B1DA61851; Tue, 19 Apr 2022 16:40:18 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id F07FCC385A7; Tue, 19 Apr 2022 16:40:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1650386418; bh=6i8ruhF5Ltjl7b0QsDur4Rd2y+D+UB0Sp+r6bnt5gQ0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=CCsceejaZuNc9CJNA+MQ2k2xKeeJqb6phUacnpMoDIkA40dFT0MU/JGr78yh30HfS jaucL3U+hl7WXJevmndk2k0fPmlOU+c0kJ7DB7/bUsy+0uCdUMLNXviU9ByIrZR7Y6 wKgZ0JWPTZOdDk8Jgq5iqtibJhz0MQ4O0TcrDj4jwYCIPMEE+WvuH24kKaFJN62tBK APB8S9FZ/JaVltcwc5L9kTs4pIz/sWaJ47MLKcbN+MQVQfAa7koWJGCvhCy7D2JBzQ 2vNTGJ6CkUlZNDWaJbvfQRsr7zVHXwG1+xpUbOsvv8K0IY6V83OhdH8mzsYQEIF+TG 4ea44N5+GI1Eg== From: Arnd Bergmann To: robert.jarzmik@free.fr, linux-arm-kernel@lists.infradead.org Cc: Arnd Bergmann , Daniel Mack , Haojian Zhuang , Marek Vasut , Philipp Zabel , Lubomir Rintel , Paul Parsons , Tomas Cech , Sergey Lapin , Thomas Bogendoerfer , Michael Turquette , Stephen Boyd , "Rafael J. Wysocki" , Viresh Kumar , Dmitry Torokhov , Ulf Hansson , Dominik Brodowski , Helge Deller , Mark Brown , Linus Walleij , linux-kernel@vger.kernel.org, linux-mips@vger.kernel.org, linux-ide@vger.kernel.org, linux-clk@vger.kernel.org, linux-pm@vger.kernel.org, linux-input@vger.kernel.org, patches@opensource.cirrus.com, linux-leds@vger.kernel.org, linux-mmc@vger.kernel.org, linux-mtd@lists.infradead.org, linux-rtc@vger.kernel.org, linux-usb@vger.kernel.org, linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org, alsa-devel@alsa-project.org, Jonathan Cameron Subject: [PATCH 11/48] ARM: pxa: move pcmcia board data into mach-pxa Date: Tue, 19 Apr 2022 18:37:33 +0200 Message-Id: <20220419163810.2118169-12-arnd@kernel.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20220419163810.2118169-1-arnd@kernel.org> References: <20220419163810.2118169-1-arnd@kernel.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220419_094019_365652_A56E05D9 X-CRM114-Status: GOOD ( 16.73 ) X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-mtd" Errors-To: linux-mtd-bounces+linux-mtd=archiver.kernel.org@lists.infradead.org From: Arnd Bergmann 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 Cc: Dominik Brodowski Cc: Jonathan Cameron Signed-off-by: Arnd Bergmann --- arch/arm/mach-pxa/Makefile | 18 ++- .../arm/mach-pxa/balloon3-pcmcia.c | 4 +- arch/arm/mach-pxa/balloon3.c | 2 +- .../mach-pxa/{include/mach => }/balloon3.h | 2 +- .../arm/mach-pxa/colibri-pcmcia.c | 2 +- .../arm/mach-pxa/e740-pcmcia.c | 2 +- .../arm/mach-pxa/hx4700-pcmcia.c | 2 +- .../arm/mach-pxa/palmld-pcmcia.c | 2 +- .../arm/mach-pxa/palmtc-pcmcia.c | 4 +- arch/arm/mach-pxa/palmtc.c | 2 +- arch/arm/mach-pxa/{include/mach => }/palmtc.h | 2 +- .../arm/mach-pxa/palmtx-pcmcia.c | 4 +- arch/arm/mach-pxa/palmtx.c | 2 +- arch/arm/mach-pxa/{include/mach => }/palmtx.h | 2 +- .../arm/mach-pxa/trizeps4-pcmcia.c | 4 +- arch/arm/mach-pxa/trizeps4.c | 2 +- .../mach-pxa/{include/mach => }/trizeps4.h | 2 +- .../arm/mach-pxa/viper-pcmcia.c | 6 +- .../arm/mach-pxa/viper-pcmcia.h | 0 arch/arm/mach-pxa/viper.c | 2 +- .../arm/mach-pxa/vpac270-pcmcia.c | 4 +- arch/arm/mach-pxa/vpac270.c | 2 +- .../arm/mach-pxa/{include/mach => }/vpac270.h | 0 arch/arm/mach-pxa/zeus.c | 2 +- drivers/pcmcia/Makefile | 13 -- drivers/pcmcia/pxa2xx_sharpsl.c | 2 +- drivers/pcmcia/soc_common.h | 120 +---------------- include/pcmcia/soc_common.h | 125 ++++++++++++++++++ 28 files changed, 165 insertions(+), 169 deletions(-) rename drivers/pcmcia/pxa2xx_balloon3.c => arch/arm/mach-pxa/balloon3-pcmcia.c (98%) rename arch/arm/mach-pxa/{include/mach => }/balloon3.h (99%) rename drivers/pcmcia/pxa2xx_colibri.c => arch/arm/mach-pxa/colibri-pcmcia.c (99%) rename drivers/pcmcia/pxa2xx_e740.c => arch/arm/mach-pxa/e740-pcmcia.c (98%) rename drivers/pcmcia/pxa2xx_hx4700.c => arch/arm/mach-pxa/hx4700-pcmcia.c (98%) rename drivers/pcmcia/pxa2xx_palmld.c => arch/arm/mach-pxa/palmld-pcmcia.c (98%) rename drivers/pcmcia/pxa2xx_palmtc.c => arch/arm/mach-pxa/palmtc-pcmcia.c (98%) rename arch/arm/mach-pxa/{include/mach => }/palmtc.h (98%) rename drivers/pcmcia/pxa2xx_palmtx.c => arch/arm/mach-pxa/palmtx-pcmcia.c (98%) rename arch/arm/mach-pxa/{include/mach => }/palmtx.h (98%) rename drivers/pcmcia/pxa2xx_trizeps4.c => arch/arm/mach-pxa/trizeps4-pcmcia.c (98%) rename arch/arm/mach-pxa/{include/mach => }/trizeps4.h (99%) rename drivers/pcmcia/pxa2xx_viper.c => arch/arm/mach-pxa/viper-pcmcia.c (97%) rename include/linux/platform_data/pcmcia-pxa2xx_viper.h => arch/arm/mach-pxa/viper-pcmcia.h (100%) rename drivers/pcmcia/pxa2xx_vpac270.c => arch/arm/mach-pxa/vpac270-pcmcia.c (98%) rename arch/arm/mach-pxa/{include/mach => }/vpac270.h (100%) create mode 100644 include/pcmcia/soc_common.h diff --git a/arch/arm/mach-pxa/Makefile b/arch/arm/mach-pxa/Makefile index 68730ceb8b7c..0aec36e67dc1 100644 --- a/arch/arm/mach-pxa/Makefile +++ b/arch/arm/mach-pxa/Makefile @@ -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 diff --git a/drivers/pcmcia/pxa2xx_balloon3.c b/arch/arm/mach-pxa/balloon3-pcmcia.c similarity index 98% rename from drivers/pcmcia/pxa2xx_balloon3.c rename to arch/arm/mach-pxa/balloon3-pcmcia.c index 5fe1da7a50e4..6a27b76cc603 100644 --- a/drivers/pcmcia/pxa2xx_balloon3.c +++ b/arch/arm/mach-pxa/balloon3-pcmcia.c @@ -20,11 +20,11 @@ #include #include -#include +#include "balloon3.h" #include -#include "soc_common.h" +#include static int balloon3_pcmcia_hw_init(struct soc_pcmcia_socket *skt) { diff --git a/arch/arm/mach-pxa/balloon3.c b/arch/arm/mach-pxa/balloon3.c index 82f9299f67d3..896d47d9a8dc 100644 --- a/arch/arm/mach-pxa/balloon3.c +++ b/arch/arm/mach-pxa/balloon3.c @@ -40,7 +40,7 @@ #include #include "pxa27x.h" -#include +#include "balloon3.h" #include #include #include diff --git a/arch/arm/mach-pxa/include/mach/balloon3.h b/arch/arm/mach-pxa/balloon3.h similarity index 99% rename from arch/arm/mach-pxa/include/mach/balloon3.h rename to arch/arm/mach-pxa/balloon3.h index 04f3639c4082..f351358c0e5b 100644 --- a/arch/arm/mach-pxa/include/mach/balloon3.h +++ b/arch/arm/mach-pxa/balloon3.h @@ -11,7 +11,7 @@ #ifndef ASM_ARCH_BALLOON3_H #define ASM_ARCH_BALLOON3_H -#include "irqs.h" /* PXA_NR_BUILTIN_GPIO */ +#include /* PXA_NR_BUILTIN_GPIO */ enum balloon3_features { BALLOON3_FEATURE_OHCI, diff --git a/drivers/pcmcia/pxa2xx_colibri.c b/arch/arm/mach-pxa/colibri-pcmcia.c similarity index 99% rename from drivers/pcmcia/pxa2xx_colibri.c rename to arch/arm/mach-pxa/colibri-pcmcia.c index f0f725e99604..9da7b478e5eb 100644 --- a/drivers/pcmcia/pxa2xx_colibri.c +++ b/arch/arm/mach-pxa/colibri-pcmcia.c @@ -14,7 +14,7 @@ #include -#include "soc_common.h" +#include #define COLIBRI270_RESET_GPIO 53 #define COLIBRI270_PPEN_GPIO 107 diff --git a/drivers/pcmcia/pxa2xx_e740.c b/arch/arm/mach-pxa/e740-pcmcia.c similarity index 98% rename from drivers/pcmcia/pxa2xx_e740.c rename to arch/arm/mach-pxa/e740-pcmcia.c index 72caa6d05ab9..133535d7ac05 100644 --- a/drivers/pcmcia/pxa2xx_e740.c +++ b/arch/arm/mach-pxa/e740-pcmcia.c @@ -18,7 +18,7 @@ #include #include -#include "soc_common.h" +#include static int e740_pcmcia_hw_init(struct soc_pcmcia_socket *skt) { diff --git a/drivers/pcmcia/pxa2xx_hx4700.c b/arch/arm/mach-pxa/hx4700-pcmcia.c similarity index 98% rename from drivers/pcmcia/pxa2xx_hx4700.c rename to arch/arm/mach-pxa/hx4700-pcmcia.c index 87b6a1639d94..e8acbfc9ef6c 100644 --- a/drivers/pcmcia/pxa2xx_hx4700.c +++ b/arch/arm/mach-pxa/hx4700-pcmcia.c @@ -12,7 +12,7 @@ #include #include -#include "soc_common.h" +#include static struct gpio gpios[] = { { GPIO114_HX4700_CF_RESET, GPIOF_OUT_INIT_LOW, "CF reset" }, diff --git a/drivers/pcmcia/pxa2xx_palmld.c b/arch/arm/mach-pxa/palmld-pcmcia.c similarity index 98% rename from drivers/pcmcia/pxa2xx_palmld.c rename to arch/arm/mach-pxa/palmld-pcmcia.c index cfff41ac9ca2..07e0f7438db1 100644 --- a/drivers/pcmcia/pxa2xx_palmld.c +++ b/arch/arm/mach-pxa/palmld-pcmcia.c @@ -14,7 +14,7 @@ #include #include -#include "soc_common.h" +#include static struct gpio palmld_pcmcia_gpios[] = { { GPIO_NR_PALMLD_PCMCIA_POWER, GPIOF_INIT_LOW, "PCMCIA Power" }, diff --git a/drivers/pcmcia/pxa2xx_palmtc.c b/arch/arm/mach-pxa/palmtc-pcmcia.c similarity index 98% rename from drivers/pcmcia/pxa2xx_palmtc.c rename to arch/arm/mach-pxa/palmtc-pcmcia.c index 8fe05613ed04..8e3f382343fe 100644 --- a/drivers/pcmcia/pxa2xx_palmtc.c +++ b/arch/arm/mach-pxa/palmtc-pcmcia.c @@ -14,8 +14,8 @@ #include #include -#include -#include "soc_common.h" +#include "palmtc.h" +#include static struct gpio palmtc_pcmcia_gpios[] = { { GPIO_NR_PALMTC_PCMCIA_POWER1, GPIOF_INIT_LOW, "PCMCIA Power 1" }, diff --git a/arch/arm/mach-pxa/palmtc.c b/arch/arm/mach-pxa/palmtc.c index c59fc76c0c3d..3054ffa397ad 100644 --- a/arch/arm/mach-pxa/palmtc.c +++ b/arch/arm/mach-pxa/palmtc.c @@ -30,7 +30,7 @@ #include "pxa25x.h" #include -#include +#include "palmtc.h" #include #include #include diff --git a/arch/arm/mach-pxa/include/mach/palmtc.h b/arch/arm/mach-pxa/palmtc.h similarity index 98% rename from arch/arm/mach-pxa/include/mach/palmtc.h rename to arch/arm/mach-pxa/palmtc.h index 9257a02c46e5..afec057c2857 100644 --- a/arch/arm/mach-pxa/include/mach/palmtc.h +++ b/arch/arm/mach-pxa/palmtc.h @@ -12,7 +12,7 @@ #ifndef _INCLUDE_PALMTC_H_ #define _INCLUDE_PALMTC_H_ -#include "irqs.h" /* PXA_GPIO_TO_IRQ */ +#include /* PXA_GPIO_TO_IRQ */ /** HERE ARE GPIOs **/ diff --git a/drivers/pcmcia/pxa2xx_palmtx.c b/arch/arm/mach-pxa/palmtx-pcmcia.c similarity index 98% rename from drivers/pcmcia/pxa2xx_palmtx.c rename to arch/arm/mach-pxa/palmtx-pcmcia.c index c449ca72cb87..8c2aaad93043 100644 --- a/drivers/pcmcia/pxa2xx_palmtx.c +++ b/arch/arm/mach-pxa/palmtx-pcmcia.c @@ -12,8 +12,8 @@ #include #include -#include -#include "soc_common.h" +#include "palmtx.h" +#include static struct gpio palmtx_pcmcia_gpios[] = { { GPIO_NR_PALMTX_PCMCIA_POWER1, GPIOF_INIT_LOW, "PCMCIA Power 1" }, diff --git a/arch/arm/mach-pxa/palmtx.c b/arch/arm/mach-pxa/palmtx.c index 097b88638863..86460d6ea721 100644 --- a/arch/arm/mach-pxa/palmtx.c +++ b/arch/arm/mach-pxa/palmtx.c @@ -33,7 +33,7 @@ #include "pxa27x.h" #include -#include +#include "palmtx.h" #include #include #include diff --git a/arch/arm/mach-pxa/include/mach/palmtx.h b/arch/arm/mach-pxa/palmtx.h similarity index 98% rename from arch/arm/mach-pxa/include/mach/palmtx.h rename to arch/arm/mach-pxa/palmtx.h index ec88abf0fc6c..a2bb993952d9 100644 --- a/arch/arm/mach-pxa/include/mach/palmtx.h +++ b/arch/arm/mach-pxa/palmtx.h @@ -12,7 +12,7 @@ #ifndef _INCLUDE_PALMTX_H_ #define _INCLUDE_PALMTX_H_ -#include "irqs.h" /* PXA_GPIO_TO_IRQ */ +#include /* PXA_GPIO_TO_IRQ */ /** HERE ARE GPIOs **/ diff --git a/drivers/pcmcia/pxa2xx_trizeps4.c b/arch/arm/mach-pxa/trizeps4-pcmcia.c similarity index 98% rename from drivers/pcmcia/pxa2xx_trizeps4.c rename to arch/arm/mach-pxa/trizeps4-pcmcia.c index 6db8fe880ed4..02d7bb0c538f 100644 --- a/drivers/pcmcia/pxa2xx_trizeps4.c +++ b/arch/arm/mach-pxa/trizeps4-pcmcia.c @@ -20,9 +20,9 @@ #include #include -#include +#include "trizeps4.h" -#include "soc_common.h" +#include extern void board_pcmcia_power(int power); diff --git a/arch/arm/mach-pxa/trizeps4.c b/arch/arm/mach-pxa/trizeps4.c index 1337008cc760..fadfbb40cd6c 100644 --- a/arch/arm/mach-pxa/trizeps4.c +++ b/arch/arm/mach-pxa/trizeps4.c @@ -40,7 +40,7 @@ #include #include "pxa27x.h" -#include +#include "trizeps4.h" #include #include #include diff --git a/arch/arm/mach-pxa/include/mach/trizeps4.h b/arch/arm/mach-pxa/trizeps4.h similarity index 99% rename from arch/arm/mach-pxa/include/mach/trizeps4.h rename to arch/arm/mach-pxa/trizeps4.h index 27926629f9c6..7597b9de11e2 100644 --- a/arch/arm/mach-pxa/include/mach/trizeps4.h +++ b/arch/arm/mach-pxa/trizeps4.h @@ -12,7 +12,7 @@ #define _TRIPEPS4_H_ #include -#include "irqs.h" /* PXA_GPIO_TO_IRQ */ +#include /* PXA_GPIO_TO_IRQ */ /* physical memory regions */ #define TRIZEPS4_FLASH_PHYS (PXA_CS0_PHYS) /* Flash region */ diff --git a/drivers/pcmcia/pxa2xx_viper.c b/arch/arm/mach-pxa/viper-pcmcia.c similarity index 97% rename from drivers/pcmcia/pxa2xx_viper.c rename to arch/arm/mach-pxa/viper-pcmcia.c index 7ac6647d286e..26599dcc49b3 100644 --- a/drivers/pcmcia/pxa2xx_viper.c +++ b/arch/arm/mach-pxa/viper-pcmcia.c @@ -22,13 +22,11 @@ #include #include +#include #include -#include - -#include "soc_common.h" -#include "pxa2xx_base.h" +#include "viper-pcmcia.h" static struct platform_device *arcom_pcmcia_dev; diff --git a/include/linux/platform_data/pcmcia-pxa2xx_viper.h b/arch/arm/mach-pxa/viper-pcmcia.h similarity index 100% rename from include/linux/platform_data/pcmcia-pxa2xx_viper.h rename to arch/arm/mach-pxa/viper-pcmcia.h diff --git a/arch/arm/mach-pxa/viper.c b/arch/arm/mach-pxa/viper.c index ac94b10bf8c1..600d9e80b00c 100644 --- a/arch/arm/mach-pxa/viper.c +++ b/arch/arm/mach-pxa/viper.c @@ -49,7 +49,7 @@ #include #include #include "regs-uart.h" -#include +#include "viper-pcmcia.h" #include "viper.h" #include diff --git a/drivers/pcmcia/pxa2xx_vpac270.c b/arch/arm/mach-pxa/vpac270-pcmcia.c similarity index 98% rename from drivers/pcmcia/pxa2xx_vpac270.c rename to arch/arm/mach-pxa/vpac270-pcmcia.c index 3565add03a5e..9fd990c8a5fb 100644 --- a/drivers/pcmcia/pxa2xx_vpac270.c +++ b/arch/arm/mach-pxa/vpac270-pcmcia.c @@ -13,9 +13,9 @@ #include -#include +#include "vpac270.h" -#include "soc_common.h" +#include static struct gpio vpac270_pcmcia_gpios[] = { { GPIO107_VPAC270_PCMCIA_PPEN, GPIOF_INIT_LOW, "PCMCIA PPEN" }, diff --git a/arch/arm/mach-pxa/vpac270.c b/arch/arm/mach-pxa/vpac270.c index 7067d1464689..8f74bafcf1f9 100644 --- a/arch/arm/mach-pxa/vpac270.c +++ b/arch/arm/mach-pxa/vpac270.c @@ -30,7 +30,7 @@ #include "pxa27x.h" #include -#include +#include "vpac270.h" #include #include #include diff --git a/arch/arm/mach-pxa/include/mach/vpac270.h b/arch/arm/mach-pxa/vpac270.h similarity index 100% rename from arch/arm/mach-pxa/include/mach/vpac270.h rename to arch/arm/mach-pxa/vpac270.h diff --git a/arch/arm/mach-pxa/zeus.c b/arch/arm/mach-pxa/zeus.c index 67396e85bb66..2e6c8d156d77 100644 --- a/arch/arm/mach-pxa/zeus.c +++ b/arch/arm/mach-pxa/zeus.c @@ -47,7 +47,7 @@ #include #include "pm.h" #include -#include +#include "viper-pcmcia.h" #include "zeus.h" #include diff --git a/drivers/pcmcia/Makefile b/drivers/pcmcia/Makefile index c43267b18f55..c59ddde42007 100644 --- a/drivers/pcmcia/Makefile +++ b/drivers/pcmcia/Makefile @@ -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 diff --git a/drivers/pcmcia/pxa2xx_sharpsl.c b/drivers/pcmcia/pxa2xx_sharpsl.c index 66fe1d1af12a..b3ba858f70cb 100644 --- a/drivers/pcmcia/pxa2xx_sharpsl.c +++ b/drivers/pcmcia/pxa2xx_sharpsl.c @@ -18,7 +18,7 @@ #include #include -#include "soc_common.h" +#include #define NO_KEEP_VS 0x0001 #define SCOOP_DEV platform_scoop_config->devs diff --git a/drivers/pcmcia/soc_common.h b/drivers/pcmcia/soc_common.h index 222e81c79365..17ef05aa8afe 100644 --- a/drivers/pcmcia/soc_common.h +++ b/drivers/pcmcia/soc_common.h @@ -13,137 +13,19 @@ /* include the world */ #include #include -#include #include - +#include 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 index 000000000000..26f1473a06c5 --- /dev/null +++ b/include/pcmcia/soc_common.h @@ -0,0 +1,125 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +#include + +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 +}; + + + -- 2.29.2 ______________________________________________________ Linux MTD discussion mailing list http://lists.infradead.org/mailman/listinfo/linux-mtd/ From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id A82B6C433F5 for ; Tue, 19 Apr 2022 16:51:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=81yB5m9zxmdODFuslAFt3kNTTllwmdxMGVKIoZed2AM=; b=fpeSJpdwjJHo76 AtFT2K8wf1d/l0P/COK+0UdFxRCWzW22VK+IglG3CbIiH9eBpwhPtwFqPmWrZZ9elvHeAI8J2CX86 lMCrSteFM5wv1AjfWBfNHGF4CbZxIx8N0D/QK0Vgmw4IGCCKAOj+LEfD80yk5hfxb9qUVHmd2Q9kR MTh8fVTPbg03c4eteZGeBwo+8XxICPHPCbNVgwKwg5F8wHN2FAhM0R/TM884pC46AOVoCUAF3hGJw MYuclb+7sUevwWcBE7BBzJ+wlAVoIAvLiln8VL1X1C5j5XdCLoovBfCgL65dukjj4KacZdbcL3Pop TSmoiA+7hzBdYenQCdpw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ngr2y-0051JX-En; Tue, 19 Apr 2022 16:49:50 +0000 Received: from dfw.source.kernel.org ([2604:1380:4641:c500::1]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1ngqtn-004wMf-4k; Tue, 19 Apr 2022 16:40:27 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 9B1DA61851; Tue, 19 Apr 2022 16:40:18 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id F07FCC385A7; Tue, 19 Apr 2022 16:40:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1650386418; bh=6i8ruhF5Ltjl7b0QsDur4Rd2y+D+UB0Sp+r6bnt5gQ0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=CCsceejaZuNc9CJNA+MQ2k2xKeeJqb6phUacnpMoDIkA40dFT0MU/JGr78yh30HfS jaucL3U+hl7WXJevmndk2k0fPmlOU+c0kJ7DB7/bUsy+0uCdUMLNXviU9ByIrZR7Y6 wKgZ0JWPTZOdDk8Jgq5iqtibJhz0MQ4O0TcrDj4jwYCIPMEE+WvuH24kKaFJN62tBK APB8S9FZ/JaVltcwc5L9kTs4pIz/sWaJ47MLKcbN+MQVQfAa7koWJGCvhCy7D2JBzQ 2vNTGJ6CkUlZNDWaJbvfQRsr7zVHXwG1+xpUbOsvv8K0IY6V83OhdH8mzsYQEIF+TG 4ea44N5+GI1Eg== From: Arnd Bergmann To: robert.jarzmik@free.fr, linux-arm-kernel@lists.infradead.org Cc: Arnd Bergmann , Daniel Mack , Haojian Zhuang , Marek Vasut , Philipp Zabel , Lubomir Rintel , Paul Parsons , Tomas Cech , Sergey Lapin , Thomas Bogendoerfer , Michael Turquette , Stephen Boyd , "Rafael J. Wysocki" , Viresh Kumar , Dmitry Torokhov , Ulf Hansson , Dominik Brodowski , Helge Deller , Mark Brown , Linus Walleij , linux-kernel@vger.kernel.org, linux-mips@vger.kernel.org, linux-ide@vger.kernel.org, linux-clk@vger.kernel.org, linux-pm@vger.kernel.org, linux-input@vger.kernel.org, patches@opensource.cirrus.com, linux-leds@vger.kernel.org, linux-mmc@vger.kernel.org, linux-mtd@lists.infradead.org, linux-rtc@vger.kernel.org, linux-usb@vger.kernel.org, linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org, alsa-devel@alsa-project.org, Jonathan Cameron Subject: [PATCH 11/48] ARM: pxa: move pcmcia board data into mach-pxa Date: Tue, 19 Apr 2022 18:37:33 +0200 Message-Id: <20220419163810.2118169-12-arnd@kernel.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20220419163810.2118169-1-arnd@kernel.org> References: <20220419163810.2118169-1-arnd@kernel.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220419_094019_365652_A56E05D9 X-CRM114-Status: GOOD ( 16.73 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Arnd Bergmann 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 Cc: Dominik Brodowski Cc: Jonathan Cameron Signed-off-by: Arnd Bergmann --- arch/arm/mach-pxa/Makefile | 18 ++- .../arm/mach-pxa/balloon3-pcmcia.c | 4 +- arch/arm/mach-pxa/balloon3.c | 2 +- .../mach-pxa/{include/mach => }/balloon3.h | 2 +- .../arm/mach-pxa/colibri-pcmcia.c | 2 +- .../arm/mach-pxa/e740-pcmcia.c | 2 +- .../arm/mach-pxa/hx4700-pcmcia.c | 2 +- .../arm/mach-pxa/palmld-pcmcia.c | 2 +- .../arm/mach-pxa/palmtc-pcmcia.c | 4 +- arch/arm/mach-pxa/palmtc.c | 2 +- arch/arm/mach-pxa/{include/mach => }/palmtc.h | 2 +- .../arm/mach-pxa/palmtx-pcmcia.c | 4 +- arch/arm/mach-pxa/palmtx.c | 2 +- arch/arm/mach-pxa/{include/mach => }/palmtx.h | 2 +- .../arm/mach-pxa/trizeps4-pcmcia.c | 4 +- arch/arm/mach-pxa/trizeps4.c | 2 +- .../mach-pxa/{include/mach => }/trizeps4.h | 2 +- .../arm/mach-pxa/viper-pcmcia.c | 6 +- .../arm/mach-pxa/viper-pcmcia.h | 0 arch/arm/mach-pxa/viper.c | 2 +- .../arm/mach-pxa/vpac270-pcmcia.c | 4 +- arch/arm/mach-pxa/vpac270.c | 2 +- .../arm/mach-pxa/{include/mach => }/vpac270.h | 0 arch/arm/mach-pxa/zeus.c | 2 +- drivers/pcmcia/Makefile | 13 -- drivers/pcmcia/pxa2xx_sharpsl.c | 2 +- drivers/pcmcia/soc_common.h | 120 +---------------- include/pcmcia/soc_common.h | 125 ++++++++++++++++++ 28 files changed, 165 insertions(+), 169 deletions(-) rename drivers/pcmcia/pxa2xx_balloon3.c => arch/arm/mach-pxa/balloon3-pcmcia.c (98%) rename arch/arm/mach-pxa/{include/mach => }/balloon3.h (99%) rename drivers/pcmcia/pxa2xx_colibri.c => arch/arm/mach-pxa/colibri-pcmcia.c (99%) rename drivers/pcmcia/pxa2xx_e740.c => arch/arm/mach-pxa/e740-pcmcia.c (98%) rename drivers/pcmcia/pxa2xx_hx4700.c => arch/arm/mach-pxa/hx4700-pcmcia.c (98%) rename drivers/pcmcia/pxa2xx_palmld.c => arch/arm/mach-pxa/palmld-pcmcia.c (98%) rename drivers/pcmcia/pxa2xx_palmtc.c => arch/arm/mach-pxa/palmtc-pcmcia.c (98%) rename arch/arm/mach-pxa/{include/mach => }/palmtc.h (98%) rename drivers/pcmcia/pxa2xx_palmtx.c => arch/arm/mach-pxa/palmtx-pcmcia.c (98%) rename arch/arm/mach-pxa/{include/mach => }/palmtx.h (98%) rename drivers/pcmcia/pxa2xx_trizeps4.c => arch/arm/mach-pxa/trizeps4-pcmcia.c (98%) rename arch/arm/mach-pxa/{include/mach => }/trizeps4.h (99%) rename drivers/pcmcia/pxa2xx_viper.c => arch/arm/mach-pxa/viper-pcmcia.c (97%) rename include/linux/platform_data/pcmcia-pxa2xx_viper.h => arch/arm/mach-pxa/viper-pcmcia.h (100%) rename drivers/pcmcia/pxa2xx_vpac270.c => arch/arm/mach-pxa/vpac270-pcmcia.c (98%) rename arch/arm/mach-pxa/{include/mach => }/vpac270.h (100%) create mode 100644 include/pcmcia/soc_common.h diff --git a/arch/arm/mach-pxa/Makefile b/arch/arm/mach-pxa/Makefile index 68730ceb8b7c..0aec36e67dc1 100644 --- a/arch/arm/mach-pxa/Makefile +++ b/arch/arm/mach-pxa/Makefile @@ -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 diff --git a/drivers/pcmcia/pxa2xx_balloon3.c b/arch/arm/mach-pxa/balloon3-pcmcia.c similarity index 98% rename from drivers/pcmcia/pxa2xx_balloon3.c rename to arch/arm/mach-pxa/balloon3-pcmcia.c index 5fe1da7a50e4..6a27b76cc603 100644 --- a/drivers/pcmcia/pxa2xx_balloon3.c +++ b/arch/arm/mach-pxa/balloon3-pcmcia.c @@ -20,11 +20,11 @@ #include #include -#include +#include "balloon3.h" #include -#include "soc_common.h" +#include static int balloon3_pcmcia_hw_init(struct soc_pcmcia_socket *skt) { diff --git a/arch/arm/mach-pxa/balloon3.c b/arch/arm/mach-pxa/balloon3.c index 82f9299f67d3..896d47d9a8dc 100644 --- a/arch/arm/mach-pxa/balloon3.c +++ b/arch/arm/mach-pxa/balloon3.c @@ -40,7 +40,7 @@ #include #include "pxa27x.h" -#include +#include "balloon3.h" #include #include #include diff --git a/arch/arm/mach-pxa/include/mach/balloon3.h b/arch/arm/mach-pxa/balloon3.h similarity index 99% rename from arch/arm/mach-pxa/include/mach/balloon3.h rename to arch/arm/mach-pxa/balloon3.h index 04f3639c4082..f351358c0e5b 100644 --- a/arch/arm/mach-pxa/include/mach/balloon3.h +++ b/arch/arm/mach-pxa/balloon3.h @@ -11,7 +11,7 @@ #ifndef ASM_ARCH_BALLOON3_H #define ASM_ARCH_BALLOON3_H -#include "irqs.h" /* PXA_NR_BUILTIN_GPIO */ +#include /* PXA_NR_BUILTIN_GPIO */ enum balloon3_features { BALLOON3_FEATURE_OHCI, diff --git a/drivers/pcmcia/pxa2xx_colibri.c b/arch/arm/mach-pxa/colibri-pcmcia.c similarity index 99% rename from drivers/pcmcia/pxa2xx_colibri.c rename to arch/arm/mach-pxa/colibri-pcmcia.c index f0f725e99604..9da7b478e5eb 100644 --- a/drivers/pcmcia/pxa2xx_colibri.c +++ b/arch/arm/mach-pxa/colibri-pcmcia.c @@ -14,7 +14,7 @@ #include -#include "soc_common.h" +#include #define COLIBRI270_RESET_GPIO 53 #define COLIBRI270_PPEN_GPIO 107 diff --git a/drivers/pcmcia/pxa2xx_e740.c b/arch/arm/mach-pxa/e740-pcmcia.c similarity index 98% rename from drivers/pcmcia/pxa2xx_e740.c rename to arch/arm/mach-pxa/e740-pcmcia.c index 72caa6d05ab9..133535d7ac05 100644 --- a/drivers/pcmcia/pxa2xx_e740.c +++ b/arch/arm/mach-pxa/e740-pcmcia.c @@ -18,7 +18,7 @@ #include #include -#include "soc_common.h" +#include static int e740_pcmcia_hw_init(struct soc_pcmcia_socket *skt) { diff --git a/drivers/pcmcia/pxa2xx_hx4700.c b/arch/arm/mach-pxa/hx4700-pcmcia.c similarity index 98% rename from drivers/pcmcia/pxa2xx_hx4700.c rename to arch/arm/mach-pxa/hx4700-pcmcia.c index 87b6a1639d94..e8acbfc9ef6c 100644 --- a/drivers/pcmcia/pxa2xx_hx4700.c +++ b/arch/arm/mach-pxa/hx4700-pcmcia.c @@ -12,7 +12,7 @@ #include #include -#include "soc_common.h" +#include static struct gpio gpios[] = { { GPIO114_HX4700_CF_RESET, GPIOF_OUT_INIT_LOW, "CF reset" }, diff --git a/drivers/pcmcia/pxa2xx_palmld.c b/arch/arm/mach-pxa/palmld-pcmcia.c similarity index 98% rename from drivers/pcmcia/pxa2xx_palmld.c rename to arch/arm/mach-pxa/palmld-pcmcia.c index cfff41ac9ca2..07e0f7438db1 100644 --- a/drivers/pcmcia/pxa2xx_palmld.c +++ b/arch/arm/mach-pxa/palmld-pcmcia.c @@ -14,7 +14,7 @@ #include #include -#include "soc_common.h" +#include static struct gpio palmld_pcmcia_gpios[] = { { GPIO_NR_PALMLD_PCMCIA_POWER, GPIOF_INIT_LOW, "PCMCIA Power" }, diff --git a/drivers/pcmcia/pxa2xx_palmtc.c b/arch/arm/mach-pxa/palmtc-pcmcia.c similarity index 98% rename from drivers/pcmcia/pxa2xx_palmtc.c rename to arch/arm/mach-pxa/palmtc-pcmcia.c index 8fe05613ed04..8e3f382343fe 100644 --- a/drivers/pcmcia/pxa2xx_palmtc.c +++ b/arch/arm/mach-pxa/palmtc-pcmcia.c @@ -14,8 +14,8 @@ #include #include -#include -#include "soc_common.h" +#include "palmtc.h" +#include static struct gpio palmtc_pcmcia_gpios[] = { { GPIO_NR_PALMTC_PCMCIA_POWER1, GPIOF_INIT_LOW, "PCMCIA Power 1" }, diff --git a/arch/arm/mach-pxa/palmtc.c b/arch/arm/mach-pxa/palmtc.c index c59fc76c0c3d..3054ffa397ad 100644 --- a/arch/arm/mach-pxa/palmtc.c +++ b/arch/arm/mach-pxa/palmtc.c @@ -30,7 +30,7 @@ #include "pxa25x.h" #include -#include +#include "palmtc.h" #include #include #include diff --git a/arch/arm/mach-pxa/include/mach/palmtc.h b/arch/arm/mach-pxa/palmtc.h similarity index 98% rename from arch/arm/mach-pxa/include/mach/palmtc.h rename to arch/arm/mach-pxa/palmtc.h index 9257a02c46e5..afec057c2857 100644 --- a/arch/arm/mach-pxa/include/mach/palmtc.h +++ b/arch/arm/mach-pxa/palmtc.h @@ -12,7 +12,7 @@ #ifndef _INCLUDE_PALMTC_H_ #define _INCLUDE_PALMTC_H_ -#include "irqs.h" /* PXA_GPIO_TO_IRQ */ +#include /* PXA_GPIO_TO_IRQ */ /** HERE ARE GPIOs **/ diff --git a/drivers/pcmcia/pxa2xx_palmtx.c b/arch/arm/mach-pxa/palmtx-pcmcia.c similarity index 98% rename from drivers/pcmcia/pxa2xx_palmtx.c rename to arch/arm/mach-pxa/palmtx-pcmcia.c index c449ca72cb87..8c2aaad93043 100644 --- a/drivers/pcmcia/pxa2xx_palmtx.c +++ b/arch/arm/mach-pxa/palmtx-pcmcia.c @@ -12,8 +12,8 @@ #include #include -#include -#include "soc_common.h" +#include "palmtx.h" +#include static struct gpio palmtx_pcmcia_gpios[] = { { GPIO_NR_PALMTX_PCMCIA_POWER1, GPIOF_INIT_LOW, "PCMCIA Power 1" }, diff --git a/arch/arm/mach-pxa/palmtx.c b/arch/arm/mach-pxa/palmtx.c index 097b88638863..86460d6ea721 100644 --- a/arch/arm/mach-pxa/palmtx.c +++ b/arch/arm/mach-pxa/palmtx.c @@ -33,7 +33,7 @@ #include "pxa27x.h" #include -#include +#include "palmtx.h" #include #include #include diff --git a/arch/arm/mach-pxa/include/mach/palmtx.h b/arch/arm/mach-pxa/palmtx.h similarity index 98% rename from arch/arm/mach-pxa/include/mach/palmtx.h rename to arch/arm/mach-pxa/palmtx.h index ec88abf0fc6c..a2bb993952d9 100644 --- a/arch/arm/mach-pxa/include/mach/palmtx.h +++ b/arch/arm/mach-pxa/palmtx.h @@ -12,7 +12,7 @@ #ifndef _INCLUDE_PALMTX_H_ #define _INCLUDE_PALMTX_H_ -#include "irqs.h" /* PXA_GPIO_TO_IRQ */ +#include /* PXA_GPIO_TO_IRQ */ /** HERE ARE GPIOs **/ diff --git a/drivers/pcmcia/pxa2xx_trizeps4.c b/arch/arm/mach-pxa/trizeps4-pcmcia.c similarity index 98% rename from drivers/pcmcia/pxa2xx_trizeps4.c rename to arch/arm/mach-pxa/trizeps4-pcmcia.c index 6db8fe880ed4..02d7bb0c538f 100644 --- a/drivers/pcmcia/pxa2xx_trizeps4.c +++ b/arch/arm/mach-pxa/trizeps4-pcmcia.c @@ -20,9 +20,9 @@ #include #include -#include +#include "trizeps4.h" -#include "soc_common.h" +#include extern void board_pcmcia_power(int power); diff --git a/arch/arm/mach-pxa/trizeps4.c b/arch/arm/mach-pxa/trizeps4.c index 1337008cc760..fadfbb40cd6c 100644 --- a/arch/arm/mach-pxa/trizeps4.c +++ b/arch/arm/mach-pxa/trizeps4.c @@ -40,7 +40,7 @@ #include #include "pxa27x.h" -#include +#include "trizeps4.h" #include #include #include diff --git a/arch/arm/mach-pxa/include/mach/trizeps4.h b/arch/arm/mach-pxa/trizeps4.h similarity index 99% rename from arch/arm/mach-pxa/include/mach/trizeps4.h rename to arch/arm/mach-pxa/trizeps4.h index 27926629f9c6..7597b9de11e2 100644 --- a/arch/arm/mach-pxa/include/mach/trizeps4.h +++ b/arch/arm/mach-pxa/trizeps4.h @@ -12,7 +12,7 @@ #define _TRIPEPS4_H_ #include -#include "irqs.h" /* PXA_GPIO_TO_IRQ */ +#include /* PXA_GPIO_TO_IRQ */ /* physical memory regions */ #define TRIZEPS4_FLASH_PHYS (PXA_CS0_PHYS) /* Flash region */ diff --git a/drivers/pcmcia/pxa2xx_viper.c b/arch/arm/mach-pxa/viper-pcmcia.c similarity index 97% rename from drivers/pcmcia/pxa2xx_viper.c rename to arch/arm/mach-pxa/viper-pcmcia.c index 7ac6647d286e..26599dcc49b3 100644 --- a/drivers/pcmcia/pxa2xx_viper.c +++ b/arch/arm/mach-pxa/viper-pcmcia.c @@ -22,13 +22,11 @@ #include #include +#include #include -#include - -#include "soc_common.h" -#include "pxa2xx_base.h" +#include "viper-pcmcia.h" static struct platform_device *arcom_pcmcia_dev; diff --git a/include/linux/platform_data/pcmcia-pxa2xx_viper.h b/arch/arm/mach-pxa/viper-pcmcia.h similarity index 100% rename from include/linux/platform_data/pcmcia-pxa2xx_viper.h rename to arch/arm/mach-pxa/viper-pcmcia.h diff --git a/arch/arm/mach-pxa/viper.c b/arch/arm/mach-pxa/viper.c index ac94b10bf8c1..600d9e80b00c 100644 --- a/arch/arm/mach-pxa/viper.c +++ b/arch/arm/mach-pxa/viper.c @@ -49,7 +49,7 @@ #include #include #include "regs-uart.h" -#include +#include "viper-pcmcia.h" #include "viper.h" #include diff --git a/drivers/pcmcia/pxa2xx_vpac270.c b/arch/arm/mach-pxa/vpac270-pcmcia.c similarity index 98% rename from drivers/pcmcia/pxa2xx_vpac270.c rename to arch/arm/mach-pxa/vpac270-pcmcia.c index 3565add03a5e..9fd990c8a5fb 100644 --- a/drivers/pcmcia/pxa2xx_vpac270.c +++ b/arch/arm/mach-pxa/vpac270-pcmcia.c @@ -13,9 +13,9 @@ #include -#include +#include "vpac270.h" -#include "soc_common.h" +#include static struct gpio vpac270_pcmcia_gpios[] = { { GPIO107_VPAC270_PCMCIA_PPEN, GPIOF_INIT_LOW, "PCMCIA PPEN" }, diff --git a/arch/arm/mach-pxa/vpac270.c b/arch/arm/mach-pxa/vpac270.c index 7067d1464689..8f74bafcf1f9 100644 --- a/arch/arm/mach-pxa/vpac270.c +++ b/arch/arm/mach-pxa/vpac270.c @@ -30,7 +30,7 @@ #include "pxa27x.h" #include -#include +#include "vpac270.h" #include #include #include diff --git a/arch/arm/mach-pxa/include/mach/vpac270.h b/arch/arm/mach-pxa/vpac270.h similarity index 100% rename from arch/arm/mach-pxa/include/mach/vpac270.h rename to arch/arm/mach-pxa/vpac270.h diff --git a/arch/arm/mach-pxa/zeus.c b/arch/arm/mach-pxa/zeus.c index 67396e85bb66..2e6c8d156d77 100644 --- a/arch/arm/mach-pxa/zeus.c +++ b/arch/arm/mach-pxa/zeus.c @@ -47,7 +47,7 @@ #include #include "pm.h" #include -#include +#include "viper-pcmcia.h" #include "zeus.h" #include diff --git a/drivers/pcmcia/Makefile b/drivers/pcmcia/Makefile index c43267b18f55..c59ddde42007 100644 --- a/drivers/pcmcia/Makefile +++ b/drivers/pcmcia/Makefile @@ -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 diff --git a/drivers/pcmcia/pxa2xx_sharpsl.c b/drivers/pcmcia/pxa2xx_sharpsl.c index 66fe1d1af12a..b3ba858f70cb 100644 --- a/drivers/pcmcia/pxa2xx_sharpsl.c +++ b/drivers/pcmcia/pxa2xx_sharpsl.c @@ -18,7 +18,7 @@ #include #include -#include "soc_common.h" +#include #define NO_KEEP_VS 0x0001 #define SCOOP_DEV platform_scoop_config->devs diff --git a/drivers/pcmcia/soc_common.h b/drivers/pcmcia/soc_common.h index 222e81c79365..17ef05aa8afe 100644 --- a/drivers/pcmcia/soc_common.h +++ b/drivers/pcmcia/soc_common.h @@ -13,137 +13,19 @@ /* include the world */ #include #include -#include #include - +#include 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 index 000000000000..26f1473a06c5 --- /dev/null +++ b/include/pcmcia/soc_common.h @@ -0,0 +1,125 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +#include + +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 +}; + + + -- 2.29.2 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 63B60C433F5 for ; Fri, 22 Apr 2022 13:39:13 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 7D55016B3; Fri, 22 Apr 2022 15:38:21 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 7D55016B3 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1650634751; bh=6i8ruhF5Ltjl7b0QsDur4Rd2y+D+UB0Sp+r6bnt5gQ0=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=Ckt1w4cQ8hKfrVuifQ88XCuWAaxvchuP2H56XTH93JKapneT1fRm8d4tz81us0DAb DRlbZcARjnqB6e7I4pHxaHn1L7zF1pyNcm4uRoQQ3lmTkdlu4h1NrcxQrg9ELfsVr+ AK1rq7xWBG2ElhesTUiXdegjevlpaxsjxzbBbH+g= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 3F62CF805E0; Fri, 22 Apr 2022 15:32:03 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 95A55F80121; Tue, 19 Apr 2022 18:40:36 +0200 (CEST) Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 48A55F804F3 for ; Tue, 19 Apr 2022 18:40:20 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 48A55F804F3 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="CCsceeja" Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 9B1DA61851; Tue, 19 Apr 2022 16:40:18 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id F07FCC385A7; Tue, 19 Apr 2022 16:40:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1650386418; bh=6i8ruhF5Ltjl7b0QsDur4Rd2y+D+UB0Sp+r6bnt5gQ0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=CCsceejaZuNc9CJNA+MQ2k2xKeeJqb6phUacnpMoDIkA40dFT0MU/JGr78yh30HfS jaucL3U+hl7WXJevmndk2k0fPmlOU+c0kJ7DB7/bUsy+0uCdUMLNXviU9ByIrZR7Y6 wKgZ0JWPTZOdDk8Jgq5iqtibJhz0MQ4O0TcrDj4jwYCIPMEE+WvuH24kKaFJN62tBK APB8S9FZ/JaVltcwc5L9kTs4pIz/sWaJ47MLKcbN+MQVQfAa7koWJGCvhCy7D2JBzQ 2vNTGJ6CkUlZNDWaJbvfQRsr7zVHXwG1+xpUbOsvv8K0IY6V83OhdH8mzsYQEIF+TG 4ea44N5+GI1Eg== From: Arnd Bergmann To: robert.jarzmik@free.fr, linux-arm-kernel@lists.infradead.org Subject: [PATCH 11/48] ARM: pxa: move pcmcia board data into mach-pxa Date: Tue, 19 Apr 2022 18:37:33 +0200 Message-Id: <20220419163810.2118169-12-arnd@kernel.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20220419163810.2118169-1-arnd@kernel.org> References: <20220419163810.2118169-1-arnd@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Mailman-Approved-At: Fri, 22 Apr 2022 15:31:41 +0200 Cc: Ulf Hansson , linux-usb@vger.kernel.org, Philipp Zabel , "Rafael J. Wysocki" , Viresh Kumar , Sergey Lapin , linux-fbdev@vger.kernel.org, Dominik Brodowski , linux-kernel@vger.kernel.org, linux-ide@vger.kernel.org, linux-mtd@lists.infradead.org, Jonathan Cameron , Tomas Cech , linux-clk@vger.kernel.org, linux-leds@vger.kernel.org, linux-rtc@vger.kernel.org, Helge Deller , Marek Vasut , Paul Parsons , Linus Walleij , Arnd Bergmann , linux-pm@vger.kernel.org, linux-input@vger.kernel.org, Haojian Zhuang , Lubomir Rintel , Mark Brown , dri-devel@lists.freedesktop.org, Thomas Bogendoerfer , Stephen Boyd , patches@opensource.cirrus.com, Dmitry Torokhov , linux-mmc@vger.kernel.org, linux-mips@vger.kernel.org, Michael Turquette , alsa-devel@alsa-project.org, Daniel Mack X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" From: Arnd Bergmann 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 Cc: Dominik Brodowski Cc: Jonathan Cameron Signed-off-by: Arnd Bergmann --- arch/arm/mach-pxa/Makefile | 18 ++- .../arm/mach-pxa/balloon3-pcmcia.c | 4 +- arch/arm/mach-pxa/balloon3.c | 2 +- .../mach-pxa/{include/mach => }/balloon3.h | 2 +- .../arm/mach-pxa/colibri-pcmcia.c | 2 +- .../arm/mach-pxa/e740-pcmcia.c | 2 +- .../arm/mach-pxa/hx4700-pcmcia.c | 2 +- .../arm/mach-pxa/palmld-pcmcia.c | 2 +- .../arm/mach-pxa/palmtc-pcmcia.c | 4 +- arch/arm/mach-pxa/palmtc.c | 2 +- arch/arm/mach-pxa/{include/mach => }/palmtc.h | 2 +- .../arm/mach-pxa/palmtx-pcmcia.c | 4 +- arch/arm/mach-pxa/palmtx.c | 2 +- arch/arm/mach-pxa/{include/mach => }/palmtx.h | 2 +- .../arm/mach-pxa/trizeps4-pcmcia.c | 4 +- arch/arm/mach-pxa/trizeps4.c | 2 +- .../mach-pxa/{include/mach => }/trizeps4.h | 2 +- .../arm/mach-pxa/viper-pcmcia.c | 6 +- .../arm/mach-pxa/viper-pcmcia.h | 0 arch/arm/mach-pxa/viper.c | 2 +- .../arm/mach-pxa/vpac270-pcmcia.c | 4 +- arch/arm/mach-pxa/vpac270.c | 2 +- .../arm/mach-pxa/{include/mach => }/vpac270.h | 0 arch/arm/mach-pxa/zeus.c | 2 +- drivers/pcmcia/Makefile | 13 -- drivers/pcmcia/pxa2xx_sharpsl.c | 2 +- drivers/pcmcia/soc_common.h | 120 +---------------- include/pcmcia/soc_common.h | 125 ++++++++++++++++++ 28 files changed, 165 insertions(+), 169 deletions(-) rename drivers/pcmcia/pxa2xx_balloon3.c => arch/arm/mach-pxa/balloon3-pcmcia.c (98%) rename arch/arm/mach-pxa/{include/mach => }/balloon3.h (99%) rename drivers/pcmcia/pxa2xx_colibri.c => arch/arm/mach-pxa/colibri-pcmcia.c (99%) rename drivers/pcmcia/pxa2xx_e740.c => arch/arm/mach-pxa/e740-pcmcia.c (98%) rename drivers/pcmcia/pxa2xx_hx4700.c => arch/arm/mach-pxa/hx4700-pcmcia.c (98%) rename drivers/pcmcia/pxa2xx_palmld.c => arch/arm/mach-pxa/palmld-pcmcia.c (98%) rename drivers/pcmcia/pxa2xx_palmtc.c => arch/arm/mach-pxa/palmtc-pcmcia.c (98%) rename arch/arm/mach-pxa/{include/mach => }/palmtc.h (98%) rename drivers/pcmcia/pxa2xx_palmtx.c => arch/arm/mach-pxa/palmtx-pcmcia.c (98%) rename arch/arm/mach-pxa/{include/mach => }/palmtx.h (98%) rename drivers/pcmcia/pxa2xx_trizeps4.c => arch/arm/mach-pxa/trizeps4-pcmcia.c (98%) rename arch/arm/mach-pxa/{include/mach => }/trizeps4.h (99%) rename drivers/pcmcia/pxa2xx_viper.c => arch/arm/mach-pxa/viper-pcmcia.c (97%) rename include/linux/platform_data/pcmcia-pxa2xx_viper.h => arch/arm/mach-pxa/viper-pcmcia.h (100%) rename drivers/pcmcia/pxa2xx_vpac270.c => arch/arm/mach-pxa/vpac270-pcmcia.c (98%) rename arch/arm/mach-pxa/{include/mach => }/vpac270.h (100%) create mode 100644 include/pcmcia/soc_common.h diff --git a/arch/arm/mach-pxa/Makefile b/arch/arm/mach-pxa/Makefile index 68730ceb8b7c..0aec36e67dc1 100644 --- a/arch/arm/mach-pxa/Makefile +++ b/arch/arm/mach-pxa/Makefile @@ -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 diff --git a/drivers/pcmcia/pxa2xx_balloon3.c b/arch/arm/mach-pxa/balloon3-pcmcia.c similarity index 98% rename from drivers/pcmcia/pxa2xx_balloon3.c rename to arch/arm/mach-pxa/balloon3-pcmcia.c index 5fe1da7a50e4..6a27b76cc603 100644 --- a/drivers/pcmcia/pxa2xx_balloon3.c +++ b/arch/arm/mach-pxa/balloon3-pcmcia.c @@ -20,11 +20,11 @@ #include #include -#include +#include "balloon3.h" #include -#include "soc_common.h" +#include static int balloon3_pcmcia_hw_init(struct soc_pcmcia_socket *skt) { diff --git a/arch/arm/mach-pxa/balloon3.c b/arch/arm/mach-pxa/balloon3.c index 82f9299f67d3..896d47d9a8dc 100644 --- a/arch/arm/mach-pxa/balloon3.c +++ b/arch/arm/mach-pxa/balloon3.c @@ -40,7 +40,7 @@ #include #include "pxa27x.h" -#include +#include "balloon3.h" #include #include #include diff --git a/arch/arm/mach-pxa/include/mach/balloon3.h b/arch/arm/mach-pxa/balloon3.h similarity index 99% rename from arch/arm/mach-pxa/include/mach/balloon3.h rename to arch/arm/mach-pxa/balloon3.h index 04f3639c4082..f351358c0e5b 100644 --- a/arch/arm/mach-pxa/include/mach/balloon3.h +++ b/arch/arm/mach-pxa/balloon3.h @@ -11,7 +11,7 @@ #ifndef ASM_ARCH_BALLOON3_H #define ASM_ARCH_BALLOON3_H -#include "irqs.h" /* PXA_NR_BUILTIN_GPIO */ +#include /* PXA_NR_BUILTIN_GPIO */ enum balloon3_features { BALLOON3_FEATURE_OHCI, diff --git a/drivers/pcmcia/pxa2xx_colibri.c b/arch/arm/mach-pxa/colibri-pcmcia.c similarity index 99% rename from drivers/pcmcia/pxa2xx_colibri.c rename to arch/arm/mach-pxa/colibri-pcmcia.c index f0f725e99604..9da7b478e5eb 100644 --- a/drivers/pcmcia/pxa2xx_colibri.c +++ b/arch/arm/mach-pxa/colibri-pcmcia.c @@ -14,7 +14,7 @@ #include -#include "soc_common.h" +#include #define COLIBRI270_RESET_GPIO 53 #define COLIBRI270_PPEN_GPIO 107 diff --git a/drivers/pcmcia/pxa2xx_e740.c b/arch/arm/mach-pxa/e740-pcmcia.c similarity index 98% rename from drivers/pcmcia/pxa2xx_e740.c rename to arch/arm/mach-pxa/e740-pcmcia.c index 72caa6d05ab9..133535d7ac05 100644 --- a/drivers/pcmcia/pxa2xx_e740.c +++ b/arch/arm/mach-pxa/e740-pcmcia.c @@ -18,7 +18,7 @@ #include #include -#include "soc_common.h" +#include static int e740_pcmcia_hw_init(struct soc_pcmcia_socket *skt) { diff --git a/drivers/pcmcia/pxa2xx_hx4700.c b/arch/arm/mach-pxa/hx4700-pcmcia.c similarity index 98% rename from drivers/pcmcia/pxa2xx_hx4700.c rename to arch/arm/mach-pxa/hx4700-pcmcia.c index 87b6a1639d94..e8acbfc9ef6c 100644 --- a/drivers/pcmcia/pxa2xx_hx4700.c +++ b/arch/arm/mach-pxa/hx4700-pcmcia.c @@ -12,7 +12,7 @@ #include #include -#include "soc_common.h" +#include static struct gpio gpios[] = { { GPIO114_HX4700_CF_RESET, GPIOF_OUT_INIT_LOW, "CF reset" }, diff --git a/drivers/pcmcia/pxa2xx_palmld.c b/arch/arm/mach-pxa/palmld-pcmcia.c similarity index 98% rename from drivers/pcmcia/pxa2xx_palmld.c rename to arch/arm/mach-pxa/palmld-pcmcia.c index cfff41ac9ca2..07e0f7438db1 100644 --- a/drivers/pcmcia/pxa2xx_palmld.c +++ b/arch/arm/mach-pxa/palmld-pcmcia.c @@ -14,7 +14,7 @@ #include #include -#include "soc_common.h" +#include static struct gpio palmld_pcmcia_gpios[] = { { GPIO_NR_PALMLD_PCMCIA_POWER, GPIOF_INIT_LOW, "PCMCIA Power" }, diff --git a/drivers/pcmcia/pxa2xx_palmtc.c b/arch/arm/mach-pxa/palmtc-pcmcia.c similarity index 98% rename from drivers/pcmcia/pxa2xx_palmtc.c rename to arch/arm/mach-pxa/palmtc-pcmcia.c index 8fe05613ed04..8e3f382343fe 100644 --- a/drivers/pcmcia/pxa2xx_palmtc.c +++ b/arch/arm/mach-pxa/palmtc-pcmcia.c @@ -14,8 +14,8 @@ #include #include -#include -#include "soc_common.h" +#include "palmtc.h" +#include static struct gpio palmtc_pcmcia_gpios[] = { { GPIO_NR_PALMTC_PCMCIA_POWER1, GPIOF_INIT_LOW, "PCMCIA Power 1" }, diff --git a/arch/arm/mach-pxa/palmtc.c b/arch/arm/mach-pxa/palmtc.c index c59fc76c0c3d..3054ffa397ad 100644 --- a/arch/arm/mach-pxa/palmtc.c +++ b/arch/arm/mach-pxa/palmtc.c @@ -30,7 +30,7 @@ #include "pxa25x.h" #include -#include +#include "palmtc.h" #include #include #include diff --git a/arch/arm/mach-pxa/include/mach/palmtc.h b/arch/arm/mach-pxa/palmtc.h similarity index 98% rename from arch/arm/mach-pxa/include/mach/palmtc.h rename to arch/arm/mach-pxa/palmtc.h index 9257a02c46e5..afec057c2857 100644 --- a/arch/arm/mach-pxa/include/mach/palmtc.h +++ b/arch/arm/mach-pxa/palmtc.h @@ -12,7 +12,7 @@ #ifndef _INCLUDE_PALMTC_H_ #define _INCLUDE_PALMTC_H_ -#include "irqs.h" /* PXA_GPIO_TO_IRQ */ +#include /* PXA_GPIO_TO_IRQ */ /** HERE ARE GPIOs **/ diff --git a/drivers/pcmcia/pxa2xx_palmtx.c b/arch/arm/mach-pxa/palmtx-pcmcia.c similarity index 98% rename from drivers/pcmcia/pxa2xx_palmtx.c rename to arch/arm/mach-pxa/palmtx-pcmcia.c index c449ca72cb87..8c2aaad93043 100644 --- a/drivers/pcmcia/pxa2xx_palmtx.c +++ b/arch/arm/mach-pxa/palmtx-pcmcia.c @@ -12,8 +12,8 @@ #include #include -#include -#include "soc_common.h" +#include "palmtx.h" +#include static struct gpio palmtx_pcmcia_gpios[] = { { GPIO_NR_PALMTX_PCMCIA_POWER1, GPIOF_INIT_LOW, "PCMCIA Power 1" }, diff --git a/arch/arm/mach-pxa/palmtx.c b/arch/arm/mach-pxa/palmtx.c index 097b88638863..86460d6ea721 100644 --- a/arch/arm/mach-pxa/palmtx.c +++ b/arch/arm/mach-pxa/palmtx.c @@ -33,7 +33,7 @@ #include "pxa27x.h" #include -#include +#include "palmtx.h" #include #include #include diff --git a/arch/arm/mach-pxa/include/mach/palmtx.h b/arch/arm/mach-pxa/palmtx.h similarity index 98% rename from arch/arm/mach-pxa/include/mach/palmtx.h rename to arch/arm/mach-pxa/palmtx.h index ec88abf0fc6c..a2bb993952d9 100644 --- a/arch/arm/mach-pxa/include/mach/palmtx.h +++ b/arch/arm/mach-pxa/palmtx.h @@ -12,7 +12,7 @@ #ifndef _INCLUDE_PALMTX_H_ #define _INCLUDE_PALMTX_H_ -#include "irqs.h" /* PXA_GPIO_TO_IRQ */ +#include /* PXA_GPIO_TO_IRQ */ /** HERE ARE GPIOs **/ diff --git a/drivers/pcmcia/pxa2xx_trizeps4.c b/arch/arm/mach-pxa/trizeps4-pcmcia.c similarity index 98% rename from drivers/pcmcia/pxa2xx_trizeps4.c rename to arch/arm/mach-pxa/trizeps4-pcmcia.c index 6db8fe880ed4..02d7bb0c538f 100644 --- a/drivers/pcmcia/pxa2xx_trizeps4.c +++ b/arch/arm/mach-pxa/trizeps4-pcmcia.c @@ -20,9 +20,9 @@ #include #include -#include +#include "trizeps4.h" -#include "soc_common.h" +#include extern void board_pcmcia_power(int power); diff --git a/arch/arm/mach-pxa/trizeps4.c b/arch/arm/mach-pxa/trizeps4.c index 1337008cc760..fadfbb40cd6c 100644 --- a/arch/arm/mach-pxa/trizeps4.c +++ b/arch/arm/mach-pxa/trizeps4.c @@ -40,7 +40,7 @@ #include #include "pxa27x.h" -#include +#include "trizeps4.h" #include #include #include diff --git a/arch/arm/mach-pxa/include/mach/trizeps4.h b/arch/arm/mach-pxa/trizeps4.h similarity index 99% rename from arch/arm/mach-pxa/include/mach/trizeps4.h rename to arch/arm/mach-pxa/trizeps4.h index 27926629f9c6..7597b9de11e2 100644 --- a/arch/arm/mach-pxa/include/mach/trizeps4.h +++ b/arch/arm/mach-pxa/trizeps4.h @@ -12,7 +12,7 @@ #define _TRIPEPS4_H_ #include -#include "irqs.h" /* PXA_GPIO_TO_IRQ */ +#include /* PXA_GPIO_TO_IRQ */ /* physical memory regions */ #define TRIZEPS4_FLASH_PHYS (PXA_CS0_PHYS) /* Flash region */ diff --git a/drivers/pcmcia/pxa2xx_viper.c b/arch/arm/mach-pxa/viper-pcmcia.c similarity index 97% rename from drivers/pcmcia/pxa2xx_viper.c rename to arch/arm/mach-pxa/viper-pcmcia.c index 7ac6647d286e..26599dcc49b3 100644 --- a/drivers/pcmcia/pxa2xx_viper.c +++ b/arch/arm/mach-pxa/viper-pcmcia.c @@ -22,13 +22,11 @@ #include #include +#include #include -#include - -#include "soc_common.h" -#include "pxa2xx_base.h" +#include "viper-pcmcia.h" static struct platform_device *arcom_pcmcia_dev; diff --git a/include/linux/platform_data/pcmcia-pxa2xx_viper.h b/arch/arm/mach-pxa/viper-pcmcia.h similarity index 100% rename from include/linux/platform_data/pcmcia-pxa2xx_viper.h rename to arch/arm/mach-pxa/viper-pcmcia.h diff --git a/arch/arm/mach-pxa/viper.c b/arch/arm/mach-pxa/viper.c index ac94b10bf8c1..600d9e80b00c 100644 --- a/arch/arm/mach-pxa/viper.c +++ b/arch/arm/mach-pxa/viper.c @@ -49,7 +49,7 @@ #include #include #include "regs-uart.h" -#include +#include "viper-pcmcia.h" #include "viper.h" #include diff --git a/drivers/pcmcia/pxa2xx_vpac270.c b/arch/arm/mach-pxa/vpac270-pcmcia.c similarity index 98% rename from drivers/pcmcia/pxa2xx_vpac270.c rename to arch/arm/mach-pxa/vpac270-pcmcia.c index 3565add03a5e..9fd990c8a5fb 100644 --- a/drivers/pcmcia/pxa2xx_vpac270.c +++ b/arch/arm/mach-pxa/vpac270-pcmcia.c @@ -13,9 +13,9 @@ #include -#include +#include "vpac270.h" -#include "soc_common.h" +#include static struct gpio vpac270_pcmcia_gpios[] = { { GPIO107_VPAC270_PCMCIA_PPEN, GPIOF_INIT_LOW, "PCMCIA PPEN" }, diff --git a/arch/arm/mach-pxa/vpac270.c b/arch/arm/mach-pxa/vpac270.c index 7067d1464689..8f74bafcf1f9 100644 --- a/arch/arm/mach-pxa/vpac270.c +++ b/arch/arm/mach-pxa/vpac270.c @@ -30,7 +30,7 @@ #include "pxa27x.h" #include -#include +#include "vpac270.h" #include #include #include diff --git a/arch/arm/mach-pxa/include/mach/vpac270.h b/arch/arm/mach-pxa/vpac270.h similarity index 100% rename from arch/arm/mach-pxa/include/mach/vpac270.h rename to arch/arm/mach-pxa/vpac270.h diff --git a/arch/arm/mach-pxa/zeus.c b/arch/arm/mach-pxa/zeus.c index 67396e85bb66..2e6c8d156d77 100644 --- a/arch/arm/mach-pxa/zeus.c +++ b/arch/arm/mach-pxa/zeus.c @@ -47,7 +47,7 @@ #include #include "pm.h" #include -#include +#include "viper-pcmcia.h" #include "zeus.h" #include diff --git a/drivers/pcmcia/Makefile b/drivers/pcmcia/Makefile index c43267b18f55..c59ddde42007 100644 --- a/drivers/pcmcia/Makefile +++ b/drivers/pcmcia/Makefile @@ -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 diff --git a/drivers/pcmcia/pxa2xx_sharpsl.c b/drivers/pcmcia/pxa2xx_sharpsl.c index 66fe1d1af12a..b3ba858f70cb 100644 --- a/drivers/pcmcia/pxa2xx_sharpsl.c +++ b/drivers/pcmcia/pxa2xx_sharpsl.c @@ -18,7 +18,7 @@ #include #include -#include "soc_common.h" +#include #define NO_KEEP_VS 0x0001 #define SCOOP_DEV platform_scoop_config->devs diff --git a/drivers/pcmcia/soc_common.h b/drivers/pcmcia/soc_common.h index 222e81c79365..17ef05aa8afe 100644 --- a/drivers/pcmcia/soc_common.h +++ b/drivers/pcmcia/soc_common.h @@ -13,137 +13,19 @@ /* include the world */ #include #include -#include #include - +#include 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 index 000000000000..26f1473a06c5 --- /dev/null +++ b/include/pcmcia/soc_common.h @@ -0,0 +1,125 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +#include + +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 +}; + + + -- 2.29.2