From 41c3548e6da67786bcaf8ee7b406f6f85ddd816b Mon Sep 17 00:00:00 2001 From: Linus Walleij Date: Fri, 6 Dec 2013 12:46:27 +0100 Subject: [PATCH] ARM: s3c64xx: get rid of custom This isolates the custom S3C64xx GPIO definition table to as this is used in a few different places in the kernel, removing the need to depend on the implicit inclusion of from and thus getting rid of a few nasty cross-dependencies. Also delete the CONFIG_SAMSUNG_GPIO_EXTRA stuff. Instead roof the number of GPIOs for this platform: First sum up all the GPIO banks from A to Q: 187 GPIOs. Add the 16 "board GPIOs" and the roof for SAMSUNG_GPIO_EXTRA, 128, so in total maximum 187+16+128 = 331 GPIOs, so let's take the same roof as for S3C24XX: 512. This way we can do away with the GPIO calculation macros for GPIO_BOARD_START, BOARD_NR_GPIOS and the definition of ARCH_NR_GPIOS. Cc: Mark Brown [on Mini6410 board] Tested-by: Tomasz Figa [for changes in mach-s3c64xx] Acked-by: Tomasz Figa Tested-by: Mark Brown Acked-by: Kukjin Kim Signed-off-by: Linus Walleij --- arch/arm/Kconfig | 3 +-- arch/arm/mach-s3c64xx/Kconfig | 3 --- arch/arm/mach-s3c64xx/common.c | 1 + arch/arm/mach-s3c64xx/crag6410.h | 2 +- arch/arm/mach-s3c64xx/dev-audio.c | 1 + arch/arm/mach-s3c64xx/mach-anw6410.c | 1 + arch/arm/mach-s3c64xx/mach-crag6410.c | 1 + arch/arm/mach-s3c64xx/mach-hmt.c | 1 + arch/arm/mach-s3c64xx/mach-mini6410.c | 1 + arch/arm/mach-s3c64xx/mach-real6410.c | 1 + arch/arm/mach-s3c64xx/mach-smartq.c | 1 + arch/arm/mach-s3c64xx/mach-smartq5.c | 1 + arch/arm/mach-s3c64xx/mach-smartq7.c | 1 + arch/arm/mach-s3c64xx/mach-smdk6400.c | 1 + arch/arm/mach-s3c64xx/mach-smdk6410.c | 1 + arch/arm/mach-s3c64xx/pm.c | 1 + arch/arm/mach-s3c64xx/setup-fb-24bpp.c | 1 + arch/arm/mach-s3c64xx/setup-i2c0.c | 1 + arch/arm/mach-s3c64xx/setup-i2c1.c | 1 + arch/arm/mach-s3c64xx/setup-ide.c | 1 + arch/arm/mach-s3c64xx/setup-keypad.c | 1 + arch/arm/mach-s3c64xx/setup-sdhci-gpio.c | 1 + arch/arm/mach-s3c64xx/setup-spi.c | 1 + arch/arm/plat-samsung/pm-gpio.c | 3 +++ drivers/gpio/gpio-samsung.c | 3 +++ .../linux/platform_data/gpio-samsung-s3c64xx.h | 9 +++++---- 26 files changed, 33 insertions(+), 10 deletions(-) rename arch/arm/mach-s3c64xx/include/mach/gpio.h => include/linux/platform_data/gpio-samsung-s3c64xx.h (95%) diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 6a26bcb3a63a..103437986684 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -732,7 +732,6 @@ config ARCH_S3C64XX select HAVE_S3C2410_I2C if I2C select HAVE_S3C2410_WATCHDOG if WATCHDOG select HAVE_TCM - select NEED_MACH_GPIO_H select NO_IOPORT select PLAT_SAMSUNG select PM_GENERIC_DOMAINS @@ -1592,7 +1591,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 || ARCH_S3C24XX + default 512 if ARCH_EXYNOS || ARCH_KEYSTONE || SOC_OMAP5 || SOC_DRA7XX || ARCH_S3C24XX || ARCH_S3C64XX default 392 if ARCH_U8500 default 352 if ARCH_VT8500 default 288 if ARCH_SUNXI diff --git a/arch/arm/mach-s3c64xx/Kconfig b/arch/arm/mach-s3c64xx/Kconfig index 2cb8dc55b50e..175f01501129 100644 --- a/arch/arm/mach-s3c64xx/Kconfig +++ b/arch/arm/mach-s3c64xx/Kconfig @@ -192,7 +192,6 @@ config SMDK6410_WM1190_EV1 select MFD_WM8350_I2C select REGULATOR select REGULATOR_WM8350 - select SAMSUNG_GPIO_EXTRA64 help The Wolfson Microelectronics 1190-EV1 is a WM835x based PMIC and audio daughtercard for the Samsung SMDK6410 reference @@ -208,7 +207,6 @@ config SMDK6410_WM1192_EV1 select MFD_WM831X_I2C select REGULATOR select REGULATOR_WM831X - select SAMSUNG_GPIO_EXTRA64 help The Wolfson Microelectronics 1192-EV1 is a WM831x based PMIC daughtercard for the Samsung SMDK6410 reference platform. @@ -294,7 +292,6 @@ config MACH_WLF_CRAGG_6410 select SAMSUNG_DEV_ADC select SAMSUNG_DEV_KEYPAD select SAMSUNG_DEV_PWM - select SAMSUNG_GPIO_EXTRA128 help Machine support for the Wolfson Cragganmore S3C6410 variant. diff --git a/arch/arm/mach-s3c64xx/common.c b/arch/arm/mach-s3c64xx/common.c index 7a3ce4c39e5f..64edda37bde3 100644 --- a/arch/arm/mach-s3c64xx/common.c +++ b/arch/arm/mach-s3c64xx/common.c @@ -32,6 +32,7 @@ #include #include #include +#include #include #include diff --git a/arch/arm/mach-s3c64xx/crag6410.h b/arch/arm/mach-s3c64xx/crag6410.h index 4c3c9994fc2c..9ef20b8fd36f 100644 --- a/arch/arm/mach-s3c64xx/crag6410.h +++ b/arch/arm/mach-s3c64xx/crag6410.h @@ -11,7 +11,7 @@ #ifndef MACH_CRAG6410_H #define MACH_CRAG6410_H -#include +#include #define GLENFARCLAS_PMIC_IRQ_BASE IRQ_BOARD_START diff --git a/arch/arm/mach-s3c64xx/dev-audio.c b/arch/arm/mach-s3c64xx/dev-audio.c index e367e87bbc29..6f58c80235dc 100644 --- a/arch/arm/mach-s3c64xx/dev-audio.c +++ b/arch/arm/mach-s3c64xx/dev-audio.c @@ -21,6 +21,7 @@ #include #include +#include #include static int s3c64xx_i2s_cfg_gpio(struct platform_device *pdev) diff --git a/arch/arm/mach-s3c64xx/mach-anw6410.c b/arch/arm/mach-s3c64xx/mach-anw6410.c index d266dd5f7060..546f45b59ea1 100644 --- a/arch/arm/mach-s3c64xx/mach-anw6410.c +++ b/arch/arm/mach-s3c64xx/mach-anw6410.c @@ -43,6 +43,7 @@ #include #include +#include #include #include diff --git a/arch/arm/mach-s3c64xx/mach-crag6410.c b/arch/arm/mach-s3c64xx/mach-crag6410.c index 758e31b26550..7b913595e4ee 100644 --- a/arch/arm/mach-s3c64xx/mach-crag6410.c +++ b/arch/arm/mach-s3c64xx/mach-crag6410.c @@ -32,6 +32,7 @@ #include #include +#include #include