Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c67d0f29 authored by Linus Walleij's avatar Linus Walleij
Browse files

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: default avatarKukjin Kim <kgene.kim@samsung.com>
Acked-by: default avatarHeiko Stuebner <heiko@sntech.de>
Tested-by: default avatarHeiko Stuebner <heiko@sntech.de>
Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent e6ae9195
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -710,7 +710,6 @@ config ARCH_S3C24XX
	select HAVE_S3C2410_WATCHDOG if WATCHDOG
	select HAVE_S3C_RTC if RTC_CLASS
	select MULTI_IRQ_HANDLER
	select NEED_MACH_GPIO_H
	select NEED_MACH_IO_H
	select SAMSUNG_ATAGS
	help
@@ -1593,7 +1592,7 @@ config ARM_PSCI
config ARCH_NR_GPIO
	int
	default 1024 if ARCH_SHMOBILE || ARCH_TEGRA
	default 512 if ARCH_EXYNOS || ARCH_KEYSTONE || SOC_OMAP5 || SOC_DRA7XX
	default 512 if ARCH_EXYNOS || ARCH_KEYSTONE || SOC_OMAP5 || SOC_DRA7XX || ARCH_S3C24XX
	default 392 if ARCH_U8500
	default 352 if ARCH_VT8500
	default 288 if ARCH_SUNXI
+0 −21
Original line number Diff line number Diff line
@@ -180,27 +180,6 @@ config CPU_LLSERIAL_S3C2440
	  Selected if there is an S3C2440 (or register compatible) serial
	  low-level implementation needed

# gpio configurations

config S3C24XX_GPIO_EXTRA
	int
	default 128 if S3C24XX_GPIO_EXTRA128
	default 64 if S3C24XX_GPIO_EXTRA64
	default 16 if ARCH_H1940
	default 0

config S3C24XX_GPIO_EXTRA64
	bool
	help
	  Add an extra 64 gpio numbers to the available GPIO pool. This is
	  available for boards that need extra gpios for external devices.

config S3C24XX_GPIO_EXTRA128
	bool
	help
	  Add an extra 128 gpio numbers to the available GPIO pool. This is
	  available for boards that need extra gpios for external devices.

config S3C24XX_PLL
	bool "Support CPUfreq changing of PLL frequency (EXPERIMENTAL)"
	depends on ARM_S3C24XX_CPUFREQ
+1 −1
Original line number Diff line number Diff line
@@ -38,7 +38,7 @@

#include <mach/regs-gpio.h>
#include <linux/platform_data/leds-s3c24xx.h>

#include <linux/platform_data/gpio-samsung-s3c24xx.h>
#include <linux/platform_data/mtd-nand-s3c2410.h>

#include <plat/gpio-cfg.h>
+1 −0
Original line number Diff line number Diff line
@@ -18,6 +18,7 @@
#include <linux/leds.h>
#include <linux/gpio.h>
#include <linux/rfkill.h>
#include <linux/platform_data/gpio-samsung-s3c24xx.h>

#include <mach/hardware.h>
#include <mach/regs-gpio.h>
+1 −0
Original line number Diff line number Diff line
@@ -54,6 +54,7 @@
#include <mach/regs-gpio.h>

#include <linux/platform_data/i2c-s3c2410.h>
#include <linux/platform_data/gpio-samsung-s3c24xx.h>
#include <plat/devs.h>
#include <plat/cpu.h>
#include <plat/gpio-cfg.h>
Loading