aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWolfram Sang <w.sang@pengutronix.de>2011-09-21 06:49:20 -0400
committerAnatolij Gustschin <agust@denx.de>2011-09-22 18:14:15 -0400
commitc68308dd50c3827a4ce77a1d70e0eb2d2521cafd (patch)
treeda838e0c576ebbf7583ee485c7366b6380b13663
parent40dc7e8b4ac5cdfcf13e3d80b71240f90ceb1f5b (diff)
gpio: move mpc8xxx/512x gpio driver to drivers/gpio
Move the driver to the place where it is expected to be nowadays. Also rename its CONFIG-name to match the rest and adapt the defconfigs. Finally, move selection of REQUIRE_GPIOLIB or WANTS_OPTIONAL_GPIOLIB to the platforms, because this option is per-platform and not per-driver. Signed-off-by: Wolfram Sang <w.sang@pengutronix.de> Cc: Anatolij Gustschin <agust@denx.de> Cc: Grant Likely <grant.likely@secretlab.ca> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Acked-by: Grant Likely <grant.likely@secretlab.ca> Signed-off-by: Anatolij Gustschin <agust@denx.de>
-rw-r--r--arch/powerpc/configs/85xx/p1023rds_defconfig2
-rw-r--r--arch/powerpc/configs/85xx/xes_mpc85xx_defconfig2
-rw-r--r--arch/powerpc/configs/mpc85xx_defconfig2
-rw-r--r--arch/powerpc/configs/mpc85xx_smp_defconfig2
-rw-r--r--arch/powerpc/configs/ppc6xx_defconfig2
-rw-r--r--arch/powerpc/platforms/512x/Kconfig1
-rw-r--r--arch/powerpc/platforms/83xx/Kconfig9
-rw-r--r--arch/powerpc/platforms/85xx/Kconfig12
-rw-r--r--arch/powerpc/platforms/86xx/Kconfig1
-rw-r--r--arch/powerpc/platforms/Kconfig10
-rw-r--r--arch/powerpc/sysdev/Makefile1
-rw-r--r--drivers/gpio/Kconfig8
-rw-r--r--drivers/gpio/Makefile1
-rw-r--r--drivers/gpio/gpio-mpc8xxx.c (renamed from arch/powerpc/sysdev/mpc8xxx_gpio.c)0
14 files changed, 30 insertions, 23 deletions
diff --git a/arch/powerpc/configs/85xx/p1023rds_defconfig b/arch/powerpc/configs/85xx/p1023rds_defconfig
index 3ff5a81c709f..c091aaf7685f 100644
--- a/arch/powerpc/configs/85xx/p1023rds_defconfig
+++ b/arch/powerpc/configs/85xx/p1023rds_defconfig
@@ -24,7 +24,7 @@ CONFIG_P1023_RDS=y
24CONFIG_QUICC_ENGINE=y 24CONFIG_QUICC_ENGINE=y
25CONFIG_QE_GPIO=y 25CONFIG_QE_GPIO=y
26CONFIG_CPM2=y 26CONFIG_CPM2=y
27CONFIG_MPC8xxx_GPIO=y 27CONFIG_GPIO_MPC8XXX=y
28CONFIG_HIGHMEM=y 28CONFIG_HIGHMEM=y
29CONFIG_NO_HZ=y 29CONFIG_NO_HZ=y
30CONFIG_HIGH_RES_TIMERS=y 30CONFIG_HIGH_RES_TIMERS=y
diff --git a/arch/powerpc/configs/85xx/xes_mpc85xx_defconfig b/arch/powerpc/configs/85xx/xes_mpc85xx_defconfig
index 5ea3124518fd..1cd6fcb368e9 100644
--- a/arch/powerpc/configs/85xx/xes_mpc85xx_defconfig
+++ b/arch/powerpc/configs/85xx/xes_mpc85xx_defconfig
@@ -20,7 +20,7 @@ CONFIG_MODULE_FORCE_UNLOAD=y
20CONFIG_MODVERSIONS=y 20CONFIG_MODVERSIONS=y
21# CONFIG_BLK_DEV_BSG is not set 21# CONFIG_BLK_DEV_BSG is not set
22CONFIG_XES_MPC85xx=y 22CONFIG_XES_MPC85xx=y
23CONFIG_MPC8xxx_GPIO=y 23CONFIG_GPIO_MPC8XXX=y
24CONFIG_HIGHMEM=y 24CONFIG_HIGHMEM=y
25CONFIG_MATH_EMULATION=y 25CONFIG_MATH_EMULATION=y
26CONFIG_SPARSE_IRQ=y 26CONFIG_SPARSE_IRQ=y
diff --git a/arch/powerpc/configs/mpc85xx_defconfig b/arch/powerpc/configs/mpc85xx_defconfig
index a3467bfb7671..250091207452 100644
--- a/arch/powerpc/configs/mpc85xx_defconfig
+++ b/arch/powerpc/configs/mpc85xx_defconfig
@@ -41,7 +41,7 @@ CONFIG_TQM8560=y
41CONFIG_SBC8548=y 41CONFIG_SBC8548=y
42CONFIG_QUICC_ENGINE=y 42CONFIG_QUICC_ENGINE=y
43CONFIG_QE_GPIO=y 43CONFIG_QE_GPIO=y
44CONFIG_MPC8xxx_GPIO=y 44CONFIG_GPIO_MPC8XXX=y
45CONFIG_HIGHMEM=y 45CONFIG_HIGHMEM=y
46CONFIG_NO_HZ=y 46CONFIG_NO_HZ=y
47CONFIG_HIGH_RES_TIMERS=y 47CONFIG_HIGH_RES_TIMERS=y
diff --git a/arch/powerpc/configs/mpc85xx_smp_defconfig b/arch/powerpc/configs/mpc85xx_smp_defconfig
index 9693f6ed3da0..a4ba13b0ef1f 100644
--- a/arch/powerpc/configs/mpc85xx_smp_defconfig
+++ b/arch/powerpc/configs/mpc85xx_smp_defconfig
@@ -42,7 +42,7 @@ CONFIG_TQM8560=y
42CONFIG_SBC8548=y 42CONFIG_SBC8548=y
43CONFIG_QUICC_ENGINE=y 43CONFIG_QUICC_ENGINE=y
44CONFIG_QE_GPIO=y 44CONFIG_QE_GPIO=y
45CONFIG_MPC8xxx_GPIO=y 45CONFIG_GPIO_MPC8XXX=y
46CONFIG_HIGHMEM=y 46CONFIG_HIGHMEM=y
47CONFIG_NO_HZ=y 47CONFIG_NO_HZ=y
48CONFIG_HIGH_RES_TIMERS=y 48CONFIG_HIGH_RES_TIMERS=y
diff --git a/arch/powerpc/configs/ppc6xx_defconfig b/arch/powerpc/configs/ppc6xx_defconfig
index 04360f9b0109..c47f2becfbc3 100644
--- a/arch/powerpc/configs/ppc6xx_defconfig
+++ b/arch/powerpc/configs/ppc6xx_defconfig
@@ -70,7 +70,7 @@ CONFIG_TAU_AVERAGE=y
70CONFIG_QUICC_ENGINE=y 70CONFIG_QUICC_ENGINE=y
71CONFIG_QE_GPIO=y 71CONFIG_QE_GPIO=y
72CONFIG_PPC_BESTCOMM=y 72CONFIG_PPC_BESTCOMM=y
73CONFIG_MPC8xxx_GPIO=y 73CONFIG_GPIO_MPC8XXX=y
74CONFIG_MCU_MPC8349EMITX=m 74CONFIG_MCU_MPC8349EMITX=m
75CONFIG_HIGHMEM=y 75CONFIG_HIGHMEM=y
76CONFIG_NO_HZ=y 76CONFIG_NO_HZ=y
diff --git a/arch/powerpc/platforms/512x/Kconfig b/arch/powerpc/platforms/512x/Kconfig
index 27b0651221d1..b3ebce1aec07 100644
--- a/arch/powerpc/platforms/512x/Kconfig
+++ b/arch/powerpc/platforms/512x/Kconfig
@@ -6,6 +6,7 @@ config PPC_MPC512x
6 select PPC_CLOCK 6 select PPC_CLOCK
7 select PPC_PCI_CHOICE 7 select PPC_PCI_CHOICE
8 select FSL_PCI if PCI 8 select FSL_PCI if PCI
9 select ARCH_WANT_OPTIONAL_GPIOLIB
9 10
10config MPC5121_ADS 11config MPC5121_ADS
11 bool "Freescale MPC5121E ADS" 12 bool "Freescale MPC5121E ADS"
diff --git a/arch/powerpc/platforms/83xx/Kconfig b/arch/powerpc/platforms/83xx/Kconfig
index 73f4135f3a1a..670a033264c0 100644
--- a/arch/powerpc/platforms/83xx/Kconfig
+++ b/arch/powerpc/platforms/83xx/Kconfig
@@ -114,18 +114,21 @@ config KMETER1
114 114
115endif 115endif
116 116
117# used for usb 117# used for usb & gpio
118config PPC_MPC831x 118config PPC_MPC831x
119 bool 119 bool
120 select ARCH_WANT_OPTIONAL_GPIOLIB
120 121
121# used for math-emu 122# used for math-emu
122config PPC_MPC832x 123config PPC_MPC832x
123 bool 124 bool
124 125
125# used for usb 126# used for usb & gpio
126config PPC_MPC834x 127config PPC_MPC834x
127 bool 128 bool
129 select ARCH_WANT_OPTIONAL_GPIOLIB
128 130
129# used for usb 131# used for usb & gpio
130config PPC_MPC837x 132config PPC_MPC837x
131 bool 133 bool
134 select ARCH_WANT_OPTIONAL_GPIOLIB
diff --git a/arch/powerpc/platforms/85xx/Kconfig b/arch/powerpc/platforms/85xx/Kconfig
index 498534cd5265..1b393f40c639 100644
--- a/arch/powerpc/platforms/85xx/Kconfig
+++ b/arch/powerpc/platforms/85xx/Kconfig
@@ -177,7 +177,8 @@ config P2040_RDB
177 select PPC_E500MC 177 select PPC_E500MC
178 select PHYS_64BIT 178 select PHYS_64BIT
179 select SWIOTLB 179 select SWIOTLB
180 select MPC8xxx_GPIO 180 select ARCH_REQUIRE_GPIOLIB
181 select GPIO_MPC8XXX
181 select HAS_RAPIDIO 182 select HAS_RAPIDIO
182 select PPC_EPAPR_HV_PIC 183 select PPC_EPAPR_HV_PIC
183 help 184 help
@@ -189,7 +190,8 @@ config P3041_DS
189 select PPC_E500MC 190 select PPC_E500MC
190 select PHYS_64BIT 191 select PHYS_64BIT
191 select SWIOTLB 192 select SWIOTLB
192 select MPC8xxx_GPIO 193 select ARCH_REQUIRE_GPIOLIB
194 select GPIO_MPC8XXX
193 select HAS_RAPIDIO 195 select HAS_RAPIDIO
194 select PPC_EPAPR_HV_PIC 196 select PPC_EPAPR_HV_PIC
195 help 197 help
@@ -201,7 +203,8 @@ config P4080_DS
201 select PPC_E500MC 203 select PPC_E500MC
202 select PHYS_64BIT 204 select PHYS_64BIT
203 select SWIOTLB 205 select SWIOTLB
204 select MPC8xxx_GPIO 206 select ARCH_REQUIRE_GPIOLIB
207 select GPIO_MPC8XXX
205 select HAS_RAPIDIO 208 select HAS_RAPIDIO
206 select PPC_EPAPR_HV_PIC 209 select PPC_EPAPR_HV_PIC
207 help 210 help
@@ -216,7 +219,8 @@ config P5020_DS
216 select PPC_E500MC 219 select PPC_E500MC
217 select PHYS_64BIT 220 select PHYS_64BIT
218 select SWIOTLB 221 select SWIOTLB
219 select MPC8xxx_GPIO 222 select ARCH_REQUIRE_GPIOLIB
223 select GPIO_MPC8XXX
220 select HAS_RAPIDIO 224 select HAS_RAPIDIO
221 select PPC_EPAPR_HV_PIC 225 select PPC_EPAPR_HV_PIC
222 help 226 help
diff --git a/arch/powerpc/platforms/86xx/Kconfig b/arch/powerpc/platforms/86xx/Kconfig
index a0b5638c5dc8..8d6599d54ea6 100644
--- a/arch/powerpc/platforms/86xx/Kconfig
+++ b/arch/powerpc/platforms/86xx/Kconfig
@@ -4,6 +4,7 @@ menuconfig PPC_86xx
4 depends on 6xx 4 depends on 6xx
5 select FSL_SOC 5 select FSL_SOC
6 select ALTIVEC 6 select ALTIVEC
7 select ARCH_WANT_OPTIONAL_GPIOLIB
7 help 8 help
8 The Freescale E600 SoCs have 74xx cores. 9 The Freescale E600 SoCs have 74xx cores.
9 10
diff --git a/arch/powerpc/platforms/Kconfig b/arch/powerpc/platforms/Kconfig
index 6de27d275728..9fdb9b6ab371 100644
--- a/arch/powerpc/platforms/Kconfig
+++ b/arch/powerpc/platforms/Kconfig
@@ -334,16 +334,6 @@ config OF_RTC
334 334
335source "arch/powerpc/sysdev/bestcomm/Kconfig" 335source "arch/powerpc/sysdev/bestcomm/Kconfig"
336 336
337config MPC8xxx_GPIO
338 bool "MPC512x/MPC8xxx GPIO support"
339 depends on PPC_MPC512x || PPC_MPC831x || PPC_MPC834x || PPC_MPC837x || \
340 FSL_SOC_BOOKE || PPC_86xx
341 select GENERIC_GPIO
342 select ARCH_REQUIRE_GPIOLIB
343 help
344 Say Y here if you're going to use hardware that connects to the
345 MPC512x/831x/834x/837x/8572/8610 GPIOs.
346
347config SIMPLE_GPIO 337config SIMPLE_GPIO
348 bool "Support for simple, memory-mapped GPIO controllers" 338 bool "Support for simple, memory-mapped GPIO controllers"
349 depends on PPC 339 depends on PPC
diff --git a/arch/powerpc/sysdev/Makefile b/arch/powerpc/sysdev/Makefile
index cf736ca0cf05..84e13253aec5 100644
--- a/arch/powerpc/sysdev/Makefile
+++ b/arch/powerpc/sysdev/Makefile
@@ -18,7 +18,6 @@ obj-$(CONFIG_FSL_PCI) += fsl_pci.o $(fsl-msi-obj-y)
18obj-$(CONFIG_FSL_PMC) += fsl_pmc.o 18obj-$(CONFIG_FSL_PMC) += fsl_pmc.o
19obj-$(CONFIG_FSL_LBC) += fsl_lbc.o 19obj-$(CONFIG_FSL_LBC) += fsl_lbc.o
20obj-$(CONFIG_FSL_GTM) += fsl_gtm.o 20obj-$(CONFIG_FSL_GTM) += fsl_gtm.o
21obj-$(CONFIG_MPC8xxx_GPIO) += mpc8xxx_gpio.o
22obj-$(CONFIG_FSL_85XX_CACHE_SRAM) += fsl_85xx_l2ctlr.o fsl_85xx_cache_sram.o 21obj-$(CONFIG_FSL_85XX_CACHE_SRAM) += fsl_85xx_l2ctlr.o fsl_85xx_cache_sram.o
23obj-$(CONFIG_SIMPLE_GPIO) += simple_gpio.o 22obj-$(CONFIG_SIMPLE_GPIO) += simple_gpio.o
24obj-$(CONFIG_FSL_RIO) += fsl_rio.o 23obj-$(CONFIG_FSL_RIO) += fsl_rio.o
diff --git a/drivers/gpio/Kconfig b/drivers/gpio/Kconfig
index d539efd96d4b..4744cf246d4a 100644
--- a/drivers/gpio/Kconfig
+++ b/drivers/gpio/Kconfig
@@ -103,6 +103,14 @@ config GPIO_MPC5200
103 def_bool y 103 def_bool y
104 depends on PPC_MPC52xx 104 depends on PPC_MPC52xx
105 105
106config GPIO_MPC8XXX
107 bool "MPC512x/MPC8xxx GPIO support"
108 depends on PPC_MPC512x || PPC_MPC831x || PPC_MPC834x || PPC_MPC837x || \
109 FSL_SOC_BOOKE || PPC_86xx
110 help
111 Say Y here if you're going to use hardware that connects to the
112 MPC512x/831x/834x/837x/8572/8610 GPIOs.
113
106config GPIO_MSM_V1 114config GPIO_MSM_V1
107 tristate "Qualcomm MSM GPIO v1" 115 tristate "Qualcomm MSM GPIO v1"
108 depends on GPIOLIB && ARCH_MSM 116 depends on GPIOLIB && ARCH_MSM
diff --git a/drivers/gpio/Makefile b/drivers/gpio/Makefile
index 9588948c96f0..828bba9883c3 100644
--- a/drivers/gpio/Makefile
+++ b/drivers/gpio/Makefile
@@ -27,6 +27,7 @@ obj-$(CONFIG_GPIO_MC33880) += gpio-mc33880.o
27obj-$(CONFIG_GPIO_MCP23S08) += gpio-mcp23s08.o 27obj-$(CONFIG_GPIO_MCP23S08) += gpio-mcp23s08.o
28obj-$(CONFIG_GPIO_ML_IOH) += gpio-ml-ioh.o 28obj-$(CONFIG_GPIO_ML_IOH) += gpio-ml-ioh.o
29obj-$(CONFIG_GPIO_MPC5200) += gpio-mpc5200.o 29obj-$(CONFIG_GPIO_MPC5200) += gpio-mpc5200.o
30obj-$(CONFIG_GPIO_MPC8XXX) += gpio-mpc8xxx.o
30obj-$(CONFIG_GPIO_MSM_V1) += gpio-msm-v1.o 31obj-$(CONFIG_GPIO_MSM_V1) += gpio-msm-v1.o
31obj-$(CONFIG_GPIO_MSM_V2) += gpio-msm-v2.o 32obj-$(CONFIG_GPIO_MSM_V2) += gpio-msm-v2.o
32obj-$(CONFIG_GPIO_MXC) += gpio-mxc.o 33obj-$(CONFIG_GPIO_MXC) += gpio-mxc.o
diff --git a/arch/powerpc/sysdev/mpc8xxx_gpio.c b/drivers/gpio/gpio-mpc8xxx.c
index fb4963abdf55..fb4963abdf55 100644
--- a/arch/powerpc/sysdev/mpc8xxx_gpio.c
+++ b/drivers/gpio/gpio-mpc8xxx.c