diff options
author | Wolfram Sang <w.sang@pengutronix.de> | 2011-09-21 06:49:20 -0400 |
---|---|---|
committer | Anatolij Gustschin <agust@denx.de> | 2011-09-22 18:14:15 -0400 |
commit | c68308dd50c3827a4ce77a1d70e0eb2d2521cafd (patch) | |
tree | da838e0c576ebbf7583ee485c7366b6380b13663 | |
parent | 40dc7e8b4ac5cdfcf13e3d80b71240f90ceb1f5b (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_defconfig | 2 | ||||
-rw-r--r-- | arch/powerpc/configs/85xx/xes_mpc85xx_defconfig | 2 | ||||
-rw-r--r-- | arch/powerpc/configs/mpc85xx_defconfig | 2 | ||||
-rw-r--r-- | arch/powerpc/configs/mpc85xx_smp_defconfig | 2 | ||||
-rw-r--r-- | arch/powerpc/configs/ppc6xx_defconfig | 2 | ||||
-rw-r--r-- | arch/powerpc/platforms/512x/Kconfig | 1 | ||||
-rw-r--r-- | arch/powerpc/platforms/83xx/Kconfig | 9 | ||||
-rw-r--r-- | arch/powerpc/platforms/85xx/Kconfig | 12 | ||||
-rw-r--r-- | arch/powerpc/platforms/86xx/Kconfig | 1 | ||||
-rw-r--r-- | arch/powerpc/platforms/Kconfig | 10 | ||||
-rw-r--r-- | arch/powerpc/sysdev/Makefile | 1 | ||||
-rw-r--r-- | drivers/gpio/Kconfig | 8 | ||||
-rw-r--r-- | drivers/gpio/Makefile | 1 | ||||
-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 | |||
24 | CONFIG_QUICC_ENGINE=y | 24 | CONFIG_QUICC_ENGINE=y |
25 | CONFIG_QE_GPIO=y | 25 | CONFIG_QE_GPIO=y |
26 | CONFIG_CPM2=y | 26 | CONFIG_CPM2=y |
27 | CONFIG_MPC8xxx_GPIO=y | 27 | CONFIG_GPIO_MPC8XXX=y |
28 | CONFIG_HIGHMEM=y | 28 | CONFIG_HIGHMEM=y |
29 | CONFIG_NO_HZ=y | 29 | CONFIG_NO_HZ=y |
30 | CONFIG_HIGH_RES_TIMERS=y | 30 | CONFIG_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 | |||
20 | CONFIG_MODVERSIONS=y | 20 | CONFIG_MODVERSIONS=y |
21 | # CONFIG_BLK_DEV_BSG is not set | 21 | # CONFIG_BLK_DEV_BSG is not set |
22 | CONFIG_XES_MPC85xx=y | 22 | CONFIG_XES_MPC85xx=y |
23 | CONFIG_MPC8xxx_GPIO=y | 23 | CONFIG_GPIO_MPC8XXX=y |
24 | CONFIG_HIGHMEM=y | 24 | CONFIG_HIGHMEM=y |
25 | CONFIG_MATH_EMULATION=y | 25 | CONFIG_MATH_EMULATION=y |
26 | CONFIG_SPARSE_IRQ=y | 26 | CONFIG_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 | |||
41 | CONFIG_SBC8548=y | 41 | CONFIG_SBC8548=y |
42 | CONFIG_QUICC_ENGINE=y | 42 | CONFIG_QUICC_ENGINE=y |
43 | CONFIG_QE_GPIO=y | 43 | CONFIG_QE_GPIO=y |
44 | CONFIG_MPC8xxx_GPIO=y | 44 | CONFIG_GPIO_MPC8XXX=y |
45 | CONFIG_HIGHMEM=y | 45 | CONFIG_HIGHMEM=y |
46 | CONFIG_NO_HZ=y | 46 | CONFIG_NO_HZ=y |
47 | CONFIG_HIGH_RES_TIMERS=y | 47 | CONFIG_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 | |||
42 | CONFIG_SBC8548=y | 42 | CONFIG_SBC8548=y |
43 | CONFIG_QUICC_ENGINE=y | 43 | CONFIG_QUICC_ENGINE=y |
44 | CONFIG_QE_GPIO=y | 44 | CONFIG_QE_GPIO=y |
45 | CONFIG_MPC8xxx_GPIO=y | 45 | CONFIG_GPIO_MPC8XXX=y |
46 | CONFIG_HIGHMEM=y | 46 | CONFIG_HIGHMEM=y |
47 | CONFIG_NO_HZ=y | 47 | CONFIG_NO_HZ=y |
48 | CONFIG_HIGH_RES_TIMERS=y | 48 | CONFIG_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 | |||
70 | CONFIG_QUICC_ENGINE=y | 70 | CONFIG_QUICC_ENGINE=y |
71 | CONFIG_QE_GPIO=y | 71 | CONFIG_QE_GPIO=y |
72 | CONFIG_PPC_BESTCOMM=y | 72 | CONFIG_PPC_BESTCOMM=y |
73 | CONFIG_MPC8xxx_GPIO=y | 73 | CONFIG_GPIO_MPC8XXX=y |
74 | CONFIG_MCU_MPC8349EMITX=m | 74 | CONFIG_MCU_MPC8349EMITX=m |
75 | CONFIG_HIGHMEM=y | 75 | CONFIG_HIGHMEM=y |
76 | CONFIG_NO_HZ=y | 76 | CONFIG_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 | ||
10 | config MPC5121_ADS | 11 | config 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 | ||
115 | endif | 115 | endif |
116 | 116 | ||
117 | # used for usb | 117 | # used for usb & gpio |
118 | config PPC_MPC831x | 118 | config PPC_MPC831x |
119 | bool | 119 | bool |
120 | select ARCH_WANT_OPTIONAL_GPIOLIB | ||
120 | 121 | ||
121 | # used for math-emu | 122 | # used for math-emu |
122 | config PPC_MPC832x | 123 | config PPC_MPC832x |
123 | bool | 124 | bool |
124 | 125 | ||
125 | # used for usb | 126 | # used for usb & gpio |
126 | config PPC_MPC834x | 127 | config PPC_MPC834x |
127 | bool | 128 | bool |
129 | select ARCH_WANT_OPTIONAL_GPIOLIB | ||
128 | 130 | ||
129 | # used for usb | 131 | # used for usb & gpio |
130 | config PPC_MPC837x | 132 | config 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 | ||
335 | source "arch/powerpc/sysdev/bestcomm/Kconfig" | 335 | source "arch/powerpc/sysdev/bestcomm/Kconfig" |
336 | 336 | ||
337 | config 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 | |||
347 | config SIMPLE_GPIO | 337 | config 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) | |||
18 | obj-$(CONFIG_FSL_PMC) += fsl_pmc.o | 18 | obj-$(CONFIG_FSL_PMC) += fsl_pmc.o |
19 | obj-$(CONFIG_FSL_LBC) += fsl_lbc.o | 19 | obj-$(CONFIG_FSL_LBC) += fsl_lbc.o |
20 | obj-$(CONFIG_FSL_GTM) += fsl_gtm.o | 20 | obj-$(CONFIG_FSL_GTM) += fsl_gtm.o |
21 | obj-$(CONFIG_MPC8xxx_GPIO) += mpc8xxx_gpio.o | ||
22 | obj-$(CONFIG_FSL_85XX_CACHE_SRAM) += fsl_85xx_l2ctlr.o fsl_85xx_cache_sram.o | 21 | obj-$(CONFIG_FSL_85XX_CACHE_SRAM) += fsl_85xx_l2ctlr.o fsl_85xx_cache_sram.o |
23 | obj-$(CONFIG_SIMPLE_GPIO) += simple_gpio.o | 22 | obj-$(CONFIG_SIMPLE_GPIO) += simple_gpio.o |
24 | obj-$(CONFIG_FSL_RIO) += fsl_rio.o | 23 | obj-$(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 | ||
106 | config 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 | |||
106 | config GPIO_MSM_V1 | 114 | config 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 | |||
27 | obj-$(CONFIG_GPIO_MCP23S08) += gpio-mcp23s08.o | 27 | obj-$(CONFIG_GPIO_MCP23S08) += gpio-mcp23s08.o |
28 | obj-$(CONFIG_GPIO_ML_IOH) += gpio-ml-ioh.o | 28 | obj-$(CONFIG_GPIO_ML_IOH) += gpio-ml-ioh.o |
29 | obj-$(CONFIG_GPIO_MPC5200) += gpio-mpc5200.o | 29 | obj-$(CONFIG_GPIO_MPC5200) += gpio-mpc5200.o |
30 | obj-$(CONFIG_GPIO_MPC8XXX) += gpio-mpc8xxx.o | ||
30 | obj-$(CONFIG_GPIO_MSM_V1) += gpio-msm-v1.o | 31 | obj-$(CONFIG_GPIO_MSM_V1) += gpio-msm-v1.o |
31 | obj-$(CONFIG_GPIO_MSM_V2) += gpio-msm-v2.o | 32 | obj-$(CONFIG_GPIO_MSM_V2) += gpio-msm-v2.o |
32 | obj-$(CONFIG_GPIO_MXC) += gpio-mxc.o | 33 | obj-$(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 | |||