aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Walleij <linus.walleij@linaro.org>2013-12-06 04:05:49 -0500
committerLinus Walleij <linus.walleij@linaro.org>2013-12-20 12:19:26 -0500
commitc67d0f29262bf6f863ce74d0756618bbd9ba80fd (patch)
tree323b95576f444c03d4525efcb65f0b6f1217f2d1
parente6ae9195909a51fb8c3a7e95c2568aefe9bc912f (diff)
ARM: s3c24xx: get rid of custom <mach/gpio.h>
This isolates the custom S3C24xx GPIO definition table to <linux/platform_data/gpio-samsung-s3x24xx.h> as this is used in a few different places in the kernel, removing the need to depend on the implicit inclusion of <mach/gpio.h> from <linux/gpio.h> and thus getting rid of a few nasty cross-dependencies. We also delete the nifty CONFIG_S3C24XX_GPIO_EXTRA stuff. The biggest this can ever be for the S3C24XX is CONFIG_S3C24XX_GPIO_EXTRA = 128, and then for CPU_S3C2443 or CPU_S3C2416 32*12 GPIOs are added, so 32*12+128 = 512 is the absolute roof value on this platform. So we set the size of ARCH_NR_GPIO to this and the GPIOs array will fit any S3C24XX platform, as per pattern from other archs. ChangeLog v2->v3: - Move the movement of the S3C64XX gpio.h file out of this patch and into the follow-up patch where it belongs. ChangeLog v1->v2: - Added an #ifdef ARCH_S3C24XX around the header inclusion in drivers/gpio/gpio-samsung.c as we would otherwise have colliding definitions when compiling S3C64XX. - Rename inclusion guard in the header file. Cc: Tomasz Figa <tomasz.figa@gmail.com> Cc: Sylwester Nawrocki <sylvester.nawrocki@gmail.com> Cc: Ben Dooks <ben-linux@fluff.org> Cc: linux-samsung-soc@vger.kernel.org Acked-by: Kukjin Kim <kgene.kim@samsung.com> Acked-by: Heiko Stuebner <heiko@sntech.de> Tested-by: Heiko Stuebner <heiko@sntech.de> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
-rw-r--r--arch/arm/Kconfig3
-rw-r--r--arch/arm/mach-s3c24xx/Kconfig21
-rw-r--r--arch/arm/mach-s3c24xx/common-smdk.c2
-rw-r--r--arch/arm/mach-s3c24xx/h1940-bluetooth.c1
-rw-r--r--arch/arm/mach-s3c24xx/mach-amlm5900.c1
-rw-r--r--arch/arm/mach-s3c24xx/mach-anubis.c1
-rw-r--r--arch/arm/mach-s3c24xx/mach-at2440evb.c1
-rw-r--r--arch/arm/mach-s3c24xx/mach-bast.c1
-rw-r--r--arch/arm/mach-s3c24xx/mach-gta02.c1
-rw-r--r--arch/arm/mach-s3c24xx/mach-h1940.c1
-rw-r--r--arch/arm/mach-s3c24xx/mach-jive.c1
-rw-r--r--arch/arm/mach-s3c24xx/mach-mini2440.c1
-rw-r--r--arch/arm/mach-s3c24xx/mach-n30.c1
-rw-r--r--arch/arm/mach-s3c24xx/mach-nexcoder.c1
-rw-r--r--arch/arm/mach-s3c24xx/mach-osiris.c1
-rw-r--r--arch/arm/mach-s3c24xx/mach-qt2410.c1
-rw-r--r--arch/arm/mach-s3c24xx/mach-rx1950.c1
-rw-r--r--arch/arm/mach-s3c24xx/mach-rx3715.c1
-rw-r--r--arch/arm/mach-s3c24xx/mach-smdk2413.c1
-rw-r--r--arch/arm/mach-s3c24xx/mach-smdk2416.c1
-rw-r--r--arch/arm/mach-s3c24xx/mach-vr1000.c1
-rw-r--r--arch/arm/mach-s3c24xx/pm-s3c2410.c1
-rw-r--r--arch/arm/mach-s3c24xx/pm.c1
-rw-r--r--arch/arm/mach-s3c24xx/s3c2410.c1
-rw-r--r--arch/arm/mach-s3c24xx/s3c2416.c1
-rw-r--r--arch/arm/mach-s3c24xx/s3c2440.c1
-rw-r--r--arch/arm/mach-s3c24xx/s3c2442.c1
-rw-r--r--arch/arm/mach-s3c24xx/s3c2443.c1
-rw-r--r--arch/arm/mach-s3c24xx/setup-i2c.c1
-rw-r--r--arch/arm/mach-s3c24xx/setup-sdhci-gpio.c1
-rw-r--r--arch/arm/mach-s3c24xx/setup-ts.c1
-rw-r--r--arch/arm/mach-s3c24xx/simtec-usb.c1
-rw-r--r--arch/arm/plat-samsung/pm-gpio.c3
-rw-r--r--arch/arm/plat-samsung/setup-camif.c1
-rw-r--r--drivers/gpio/gpio-samsung.c3
-rw-r--r--drivers/mmc/host/s3cmci.c1
-rw-r--r--include/linux/platform_data/gpio-samsung-s3c24xx.h (renamed from arch/arm/mach-s3c24xx/include/mach/gpio.h)14
37 files changed, 42 insertions, 35 deletions
</
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index c1f1a7eee953..6a26bcb3a63a 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -710,7 +710,6 @@ config ARCH_S3C24XX
710 select HAVE_S3C2410_WATCHDOG if WATCHDOG 710 select HAVE_S3C2410_WATCHDOG if WATCHDOG
711 select HAVE_S3C_RTC if RTC_CLASS 711 select HAVE_S3C_RTC if RTC_CLASS
712 select MULTI_IRQ_HANDLER 712 select MULTI_IRQ_HANDLER
713 select NEED_MACH_GPIO_H
714 select NEED_MACH_IO_H 713 select NEED_MACH_IO_H
715 select SAMSUNG_ATAGS 714 select SAMSUNG_ATAGS
716 help 715 help
@@ -1593,7 +1592,7 @@ config ARM_PSCI
1593config ARCH_NR_GPIO 1592config ARCH_NR_GPIO
1594 int 1593 int
1595 default 1024 if ARCH_SHMOBILE || ARCH_TEGRA 1594 default 1024 if ARCH_SHMOBILE || ARCH_TEGRA
1596 default 512 if ARCH_EXYNOS || ARCH_KEYSTONE || SOC_OMAP5 || SOC_DRA7XX 1595 default 512 if ARCH_EXYNOS || ARCH_KEYSTONE || SOC_OMAP5 || SOC_DRA7XX || ARCH_S3C24XX
1597 default 392 if ARCH_U8500 1596 default 392 if ARCH_U8500
1598 default 352 if ARCH_VT8500 1597 default 352 if ARCH_VT8500
1599 default 288 if ARCH_SUNXI 1598 default 288 if ARCH_SUNXI
diff --git a/arch/arm/mach-s3c24xx/Kconfig b/arch/arm/mach-s3c24xx/Kconfig
index 8f1d327e0cd1..d876431d64c0 100644
--- a/arch/arm/mach-s3c24xx/Kconfig
+++ b/arch/arm/mach-s3c24xx/Kconfig
@@ -180,27 +180,6 @@ config CPU_LLSERIAL_S3C2440
180 Selected if there is an S3C2440 (or register compatible) serial 180 Selected if there is an S3C2440 (or register compatible) serial
181 low-level implementation needed 181 low-level implementation needed
182 182
183# gpio configurations
184
185config S3C24XX_GPIO_EXTRA
186 int
187 default 128 if S3C24XX_GPIO_EXTRA128
188 default 64 if S3C24XX_GPIO_EXTRA64
189 default 16 if ARCH_H1940
190 default 0
191
192config S3C24XX_GPIO_EXTRA64
193 bool
194 help
195 Add an extra 64 gpio numbers to the available GPIO pool. This is
196 available for boards that need extra gpios for external devices.
197
198config S3C24XX_GPIO_EXTRA128
199 bool
200 help
201 Add an extra 128 gpio numbers to the available GPIO pool. This is
202 available for boards that need extra gpios for external devices.
203
204config S3C24XX_PLL 183config S3C24XX_PLL
205 bool "Support CPUfreq changing of PLL frequency (EXPERIMENTAL)" 184 bool "Support CPUfreq changing of PLL frequency (EXPERIMENTAL)"
206 depends on ARM_S3C24XX_CPUFREQ 185 depends on ARM_S3C24XX_CPUFREQ
diff --git a/arch/arm/mach-s3c24xx/common-smdk.c b/arch/arm/mach-s3c24xx/common-smdk.c
index 404444dd3840..0a84a9c9f429 100644
--- a/arch/arm/mach-s3c24xx/common-smdk.c
+++ b/arch/arm/mach-s3c24xx/common-smdk.c
@@ -38,7 +38,7 @@
38 38
39#include <mach/regs-gpio.h> 39#include <mach/regs-gpio.h>
40#include <linux/platform_data/leds-s3c24xx.h> 40#include <linux/platform_data/leds-s3c24xx.h>
41 41#include <linux/platform_data/gpio-samsung-s3c24xx.h>
42#include <linux/platform_data/mtd-nand-s3c2410.h> 42#include <linux/platform_data/mtd-nand-s3c2410.h>
43 43
44#include <plat/gpio-cfg.h> 44#include <plat/gpio-cfg.h>
diff --git a/arch/arm/mach-s3c24xx/h1940-bluetooth.c b/arch/arm/mach-s3c24xx/h1940-bluetooth.c
index 5b98bfd1df43..f2b859f4c894 100644
--- a/arch/arm/mach-s3c24xx/h1940-bluetooth.c
+++ b/arch/arm/mach-s3c24xx/h1940-bluetooth.c
@@ -18,6 +18,7 @@
18#include <linux/leds.h> 18#include <linux/leds.h>
19#include <linux/gpio.h> 19#include <linux/gpio.h>
20#include <linux/rfkill.h> 20#include <linux/rfkill.h>
21#include <linux/platform_data/gpio-samsung-s3c24xx.h>
21 22
22#include <mach/hardware.h> 23#include <mach/hardware.h>
23#include <mach/regs-gpio.h> 24#include <mach/regs-gpio.h>
diff --git a/arch/arm/mach-s3c24xx/mach-amlm5900.c b/arch/arm/mach-s3c24xx/mach-amlm5900.c
index e27b5c91b3db..530e9a624466 100644
--- a/arch/arm/mach-s3c24xx/mach-amlm5900.c
+++ b/arch/arm/mach-s3c24xx/mach-amlm5900.c
@@ -54,6 +54,7 @@
54#include <mach/regs-gpio.h> 54#include <mach/regs-gpio.h>
55 55
56#include <linux/platform_data/i2c-s3c2410.h> 56#include <linux/platform_data/i2c-s3c2410.h>
57#include <linux/platform_data/gpio-samsung-s3c24xx.h>
57#include <plat/devs.h> 58#include <plat/devs.h>
58#include <plat/cpu.h> 59#include <plat/cpu.h>
59#include <plat/gpio-cfg.h> 60#include <plat/gpio-cfg.h>
diff --git a/arch/arm/mach-s3c24xx/mach-anubis.c b/arch/arm/mach-s3c24xx/mach-anubis.c
index c1fb6c37867f..b60a248c033a 100644
--- a/arch/arm/mach-s3c24xx/mach-anubis.c
+++ b/arch/arm/mach-s3c24xx/mach-anubis.c
@@ -37,6 +37,7 @@
37#include <mach/regs-lcd.h> 37#include <mach/regs-lcd.h>
38#include <linux/platform_data/mtd-nand-s3c2410.h> 38#include <linux/platform_data/mtd-nand-s3c2410.h>
39#include <linux/platform_data/i2c-s3c2410.h> 39#include <linux/platform_data/i2c-s3c2410.h>
40#include <linux/platform_data/gpio-samsung-s3c24xx.h>
40 41
41#include <linux/mtd/mtd.h> 42#include <linux/mtd/mtd.h>
42#include <linux/mtd/nand.h> 43#include <linux/mtd/nand.h>
diff --git a/arch/arm/mach-s3c24xx/mach-at2440evb.c b/arch/arm/mach-s3c24xx/mach-at2440evb.c
index 6dfeeb7ef469..74401196b429 100644
--- a/arch/arm/mach-s3c24xx/mach-at2440evb.c
+++ b/arch/arm/mach-s3c24xx/mach-at2440evb.c
@@ -38,6 +38,7 @@
38#include <mach/regs-lcd.h> 38#include <mach/regs-lcd.h>
39#include <linux/platform_data/mtd-nand-s3c2410.h> 39#include <linux/platform_data/mtd-nand-s3c2410.h>
40#include <linux/platform_data/i2c-s3c2410.h> 40#include <linux/platform_data/i2c-s3c2410.h>
41#include <linux/platform_data/gpio-samsung-s3c24xx.h>
41 42
42#include <linux/mtd/mtd.h> 43#include <linux/mtd/mtd.h>
43#include <linux/mtd/nand.h> 44#include <linux/mtd/nand.h>
diff --git a/arch/arm/mach-s3c24xx/mach-bast.c b/arch/arm/mach-s3c24xx/mach-bast.c
index 22d6ae926d91..47fe7af87129 100644
--- a/arch/arm/mach-s3c24xx/mach-bast.c
+++ b/arch/arm/mach-s3c24xx/mach-bast.c
@@ -35,6 +35,7 @@
35#include <linux/platform_data/hwmon-s3c.h> 35#include <linux/platform_data/hwmon-s3c.h>
36#include <linux/platform_data/i2c-s3c2410.h> 36#include <linux/platform_data/i2c-s3c2410.h>
37#include <linux/platform_data/mtd-nand-s3c2410.h> 37#include <linux/platform_data/mtd-nand-s3c2410.h>
38#include <linux/platform_data/gpio-samsung-s3c24xx.h>