diff options
| author | Linus Walleij <linus.walleij@linaro.org> | 2013-12-06 06:46:27 -0500 |
|---|---|---|
| committer | Linus Walleij <linus.walleij@linaro.org> | 2013-12-20 12:19:36 -0500 |
| commit | 41c3548e6da67786bcaf8ee7b406f6f85ddd816b (patch) | |
| tree | a1d57c285d2113ce97ca8bfd817a6e42c400474e | |
| parent | c67d0f29262bf6f863ce74d0756618bbd9ba80fd (diff) | |
ARM: s3c64xx: get rid of custom <mach/gpio.h>
This isolates the custom S3C64xx GPIO definition table to
<linux/platform_data/gpio-samsung-s3x64xx.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.
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 <broonie@kernel.org>
[on Mini6410 board]
Tested-by: Tomasz Figa <t.figa@samsung.com>
[for changes in mach-s3c64xx]
Acked-by: Tomasz Figa <t.figa@samsung.com>
Tested-by: Mark Brown <broonie@linaro.org>
Acked-by: Kukjin Kim <kgene.kim@samsung.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
26 files changed, 33 insertions, 10 deletions
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 | |||
| 732 | select HAVE_S3C2410_I2C if I2C | 732 | select HAVE_S3C2410_I2C if I2C |
| 733 | select HAVE_S3C2410_WATCHDOG if WATCHDOG | 733 | select HAVE_S3C2410_WATCHDOG if WATCHDOG |
| 734 | select HAVE_TCM | 734 | select HAVE_TCM |
| 735 | select NEED_MACH_GPIO_H | ||
| 736 | select NO_IOPORT | 735 | select NO_IOPORT |
| 737 | select PLAT_SAMSUNG | 736 | select PLAT_SAMSUNG |
| 738 | select PM_GENERIC_DOMAINS | 737 | select PM_GENERIC_DOMAINS |
| @@ -1592,7 +1591,7 @@ config ARM_PSCI | |||
| 1592 | config ARCH_NR_GPIO | 1591 | config ARCH_NR_GPIO |
| 1593 | int | 1592 | int |
| 1594 | default 1024 if ARCH_SHMOBILE || ARCH_TEGRA | 1593 | default 1024 if ARCH_SHMOBILE || ARCH_TEGRA |
| 1595 | default 512 if ARCH_EXYNOS || ARCH_KEYSTONE || SOC_OMAP5 || SOC_DRA7XX || ARCH_S3C24XX | 1594 | default 512 if ARCH_EXYNOS || ARCH_KEYSTONE || SOC_OMAP5 || SOC_DRA7XX || ARCH_S3C24XX || ARCH_S3C64XX |
| 1596 | default 392 if ARCH_U8500 | 1595 | default 392 if ARCH_U8500 |
| 1597 | default 352 if ARCH_VT8500 | 1596 | default 352 if ARCH_VT8500 |
| 1598 | default 288 if ARCH_SUNXI | 1597 | 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 | |||
| 192 | select MFD_WM8350_I2C | 192 | select MFD_WM8350_I2C |
| 193 | select REGULATOR | 193 | select REGULATOR |
| 194 | select REGULATOR_WM8350 | 194 | select REGULATOR_WM8350 |
| 195 | select SAMSUNG_GPIO_EXTRA64 | ||
| 196 | help | 195 | help |
| 197 | The Wolfson Microelectronics 1190-EV1 is a WM835x based PMIC | 196 | The Wolfson Microelectronics 1190-EV1 is a WM835x based PMIC |
| 198 | and audio daughtercard for the Samsung SMDK6410 reference | 197 | and audio daughtercard for the Samsung SMDK6410 reference |
| @@ -208,7 +207,6 @@ config SMDK6410_WM1192_EV1 | |||
| 208 | select MFD_WM831X_I2C | 207 | select MFD_WM831X_I2C |
| 209 | select REGULATOR | 208 | select REGULATOR |
| 210 | select REGULATOR_WM831X | 209 | select REGULATOR_WM831X |
| 211 | select SAMSUNG_GPIO_EXTRA64 | ||
| 212 | help | 210 | help |
| 213 | The Wolfson Microelectronics 1192-EV1 is a WM831x based PMIC | 211 | The Wolfson Microelectronics 1192-EV1 is a WM831x based PMIC |
| 214 | daughtercard for the Samsung SMDK6410 reference platform. | 212 | daughtercard for the Samsung SMDK6410 reference platform. |
| @@ -294,7 +292,6 @@ config MACH_WLF_CRAGG_6410 | |||
| 294 | select SAMSUNG_DEV_ADC | 292 | select SAMSUNG_DEV_ADC |
| 295 | select SAMSUNG_DEV_KEYPAD | 293 | select SAMSUNG_DEV_KEYPAD |
| 296 | select SAMSUNG_DEV_PWM | 294 | select SAMSUNG_DEV_PWM |
| 297 | select SAMSUNG_GPIO_EXTRA128 | ||
| 298 | help | 295 | help |
| 299 | Machine support for the Wolfson Cragganmore S3C6410 variant. | 296 | Machine support for the Wolfson Cragganmore S3C6410 variant. |
| 300 | 297 | ||
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 @@ | |||
| 32 | #include <linux/irq.h> | 32 | #include <linux/irq.h> |
| 33 | #include <linux/gpio.h> | 33 | #include <linux/gpio.h> |
| 34 | #include <linux/irqchip/arm-vic.h> | 34 | #include <linux/irqchip/arm-vic.h> |
| 35 | #include <linux/platform_data/gpio-samsung-s3c64xx.h> | ||
| 35 | #include <clocksource/samsung_pwm.h> | 36 | #include <clocksource/samsung_pwm.h> |
| 36 | 37 | ||
| 37 | #include <asm/mach/arch.h> | 38 | #include <asm/mach/arch.h> |
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 @@ | |||
| 11 | #ifndef MACH_CRAG6410_H | 11 | #ifndef MACH_CRAG6410_H |
| 12 | #define MACH_CRAG6410_H | 12 | #define MACH_CRAG6410_H |
| 13 | 13 | ||
| 14 | #include <linux/gpio.h> | 14 | #include <linux/platform_data/gpio-samsung-s3c64xx.h> |
| 15 | 15 | ||
| 16 | #define GLENFARCLAS_PMIC_IRQ_BASE IRQ_BOARD_START | 16 | #define GLENFARCLAS_PMIC_IRQ_BASE IRQ_BOARD_START |
| 17 | 17 | ||
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 @@ | |||
| 21 | 21 | ||
| 22 | #include <plat/devs.h> | 22 | #include <plat/devs.h> |
| 23 | #include <linux/platform_data/asoc-s3c.h> | 23 | #include <linux/platform_data/asoc-s3c.h> |
| 24 | #include <linux/platform_data/gpio-samsung-s3c64xx.h> | ||
| 24 | #include <plat/gpio-cfg.h> | 25 | #include <plat/gpio-cfg.h> |
| 25 | 26 | ||
| 26 | static int s3c64xx_i2s_cfg_gpio(struct platform_device *pdev) | 27 | 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 @@ | |||
| 43 | 43 | ||
| 44 | #include <plat/regs-serial.h> | 44 | #include <plat/regs-serial.h> |
| 45 | #include <linux/platform_data/i2c-s3c2410.h> | 45 | #include <linux/platform_data/i2c-s3c2410.h> |
| 46 | #include <linux/platform_data/gpio-samsung-s3c64xx.h> | ||
| 46 | #include <plat/fb.h> | 47 | #include <plat/fb.h> |
| 47 | 48 | ||
| 48 | #include <plat/clock.h> | 49 | #include <plat/clock.h> |
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 @@ | |||
| 32 | 32 | ||
| 33 | #include <linux/platform_data/pca953x.h> | 33 | #include <linux/platform_data/pca953x.h> |
| 34 | #include <linux/platform_data/s3c-hsotg.h> | 34 | #include <linux/platform_data/s3c-hsotg.h> |
| 35 | #include <linux/platform_data/gpio-samsung-s3c64xx.h> | ||
| 35 | 36 | ||
| 36 | #include <video/platform_lcd.h> | 37 | #include <video/platform_lcd.h> |
| 37 | 38 | ||
diff --git a/arch/arm/mach-s3c64xx/mach-hmt.c b/arch/arm/mach-s3c64xx/mach-hmt.c index 614a03a92cf7..009b19525cbf 100644 --- a/arch/arm/mach-s3c64xx/mach-hmt.c +++ b/arch/arm/mach-s3c64xx/mach-hmt.c | |||
| @@ -35,6 +35,7 @@ | |||
| 35 | 35 | ||
| 36 | #include <plat/regs-serial.h> | 36 | #include <plat/regs-serial.h> |
| 37 | #include <linux/platform_data/i2c-s3c2410.h> | 37 | #include <linux/platform_data/i2c-s3c2410.h> |
| 38 | #include <linux/platform_data/gpio-samsung-s3c64xx.h> | ||
| 38 | #include <plat/fb.h> | 39 | #include <plat/fb.h> |
| 39 | #include <linux/platform_data/mtd-nand-s3c2410.h> | 40 | #include <linux/platform_data/mtd-nand-s3c2410.h> |
| 40 | 41 | ||
diff --git a/arch/arm/mach-s3c64xx/mach-mini6410.c b/arch/arm/mach-s3c64xx/mach-mini6410.c index 58d46a3d7b78..14c96ee5a3fe 100644 --- a/arch/arm/mach-s3c64xx/mach-mini6410.c +++ b/arch/arm/mach-s3c64xx/mach-mini6410.c | |||
| @@ -38,6 +38,7 @@ | |||
| 38 | #include <linux/platform_data/mtd-nand-s3c2410.h> | 38 | #include <linux/platform_data/mtd-nand-s3c2410.h> |
| 39 | #include <plat/regs-serial.h> | 39 | #include <plat/regs-serial.h> |
| 40 | #include <linux/platform_data/touchscreen-s3c2410.h> | 40 | #include <linux/platform_data/touchscreen-s3c2410.h> |
| 41 | #include <linux/platform_data/gpio-samsung-s3c64xx.h> | ||
| 41 | 42 | ||
| 42 | #include <video/platform_lcd.h> | 43 | #include <video/platform_lcd.h> |
| 43 | #include <video/samsung_fimd.h> | 44 | #include <video/samsung_fimd.h> |
diff --git a/arch/arm/mach-s3c64xx/mach-real6410.c b/arch/arm/mach-s3c64xx/mach-real6410.c index 8bed37b3d5ac..af45149a96b3 100644 --- a/arch/arm/mach-s3c64xx/mach-real6410.c | |||
