diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 6a26bcb3a63a6638421ded7c7b50b7ad55d76090..1034379866841bac42e907c0e7885b1b116cc321 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 2cb8dc55b50ecbc4aa612ab805b52f03efec3eb9..175f01501129d6047677a43961735dcf49f8e636 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 7a3ce4c39e5fecd3470b06344295d766869b702e..64edda37bde3ac0ca0f366a95c040934e41cab8e 100644 --- a/arch/arm/mach-s3c64xx/common.c +++ b/arch/arm/mach-s3c64xx/common.c @@ -32,6 +32,7 @@ #include <linux/irq.h> #include <linux/gpio.h> #include <linux/irqchip/arm-vic.h> +#include <linux/platform_data/gpio-samsung-s3c64xx.h> #include <clocksource/samsung_pwm.h> #include <asm/mach/arch.h> diff --git a/arch/arm/mach-s3c64xx/crag6410.h b/arch/arm/mach-s3c64xx/crag6410.h index 4c3c9994fc2c2bac09fa6bb02de090664694b713..9ef20b8fd36f3b9d3ca65ed256ba2a0903efb9cc 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 <linux/gpio.h> +#include <linux/platform_data/gpio-samsung-s3c64xx.h> #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 e367e87bbc2966d039eba15bcf90224d0010e105..6f58c80235dcbc7b828824a117fb76ca75352fed 100644 --- a/arch/arm/mach-s3c64xx/dev-audio.c +++ b/arch/arm/mach-s3c64xx/dev-audio.c @@ -21,6 +21,7 @@ #include <plat/devs.h> #include <linux/platform_data/asoc-s3c.h> +#include <linux/platform_data/gpio-samsung-s3c64xx.h> #include <plat/gpio-cfg.h> 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 d266dd5f7060ec37d0266205bf129bdf86177a3e..546f45b59ea148f737ed8528ca7e4f2d79d7909d 100644 --- a/arch/arm/mach-s3c64xx/mach-anw6410.c +++ b/arch/arm/mach-s3c64xx/mach-anw6410.c @@ -43,6 +43,7 @@ #include <plat/regs-serial.h> #include <linux/platform_data/i2c-s3c2410.h> +#include <linux/platform_data/gpio-samsung-s3c64xx.h> #include <plat/fb.h> #include <plat/clock.h> diff --git a/arch/arm/mach-s3c64xx/mach-crag6410.c b/arch/arm/mach-s3c64xx/mach-crag6410.c index 758e31b265501de472aa6eba453038385e102536..7b913595e4ee5cd477ecd36edd0594aa4fd6da4d 100644 --- a/arch/arm/mach-s3c64xx/mach-crag6410.c +++ b/arch/arm/mach-s3c64xx/mach-crag6410.c @@ -32,6 +32,7 @@ #include <linux/platform_data/pca953x.h> #include <linux/platform_data/s3c-hsotg.h> +#include <linux/platform_data/gpio-samsung-s3c64xx.h> #include <video/platform_lcd.h> diff --git a/arch/arm/mach-s3c64xx/mach-hmt.c b/arch/arm/mach-s3c64xx/mach-hmt.c index 614a03a92cf70545be3fd60bb66a29dc46b1fb6e..009b19525cbf112a8b648669556ed259e5cc8e52 100644 --- a/arch/arm/mach-s3c64xx/mach-hmt.c +++ b/arch/arm/mach-s3c64xx/mach-hmt.c @@ -35,6 +35,7 @@ #include <plat/regs-serial.h> #include <linux/platform_data/i2c-s3c2410.h> +#include <linux/platform_data/gpio-samsung-s3c64xx.h> #include <plat/fb.h> #include <linux/platform_data/mtd-nand-s3c2410.h> diff --git a/arch/arm/mach-s3c64xx/mach-mini6410.c b/arch/arm/mach-s3c64xx/mach-mini6410.c index 58d46a3d7b78936f88318824d1a378fea2532fc1..14c96ee5a3fedd1abcfd5cd629a83c6d93b8a598 100644 --- a/arch/arm/mach-s3c64xx/mach-mini6410.c +++ b/arch/arm/mach-s3c64xx/mach-mini6410.c @@ -38,6 +38,7 @@ #include <linux/platform_data/mtd-nand-s3c2410.h> #include <plat/regs-serial.h> #include <linux/platform_data/touchscreen-s3c2410.h> +#include <linux/platform_data/gpio-samsung-s3c64xx.h> #include <video/platform_lcd.h> #include <video/samsung_fimd.h> diff --git a/arch/arm/mach-s3c64xx/mach-real6410.c b/arch/arm/mach-s3c64xx/mach-real6410.c index 8bed37b3d5ac8897eaa49912f67edacdbed238fe..af45149a96b3866af2f9828e9c6ee7fc134ea998 100644 --- a/arch/arm/mach-s3c64xx/mach-real6410.c +++ b/arch/arm/mach-s3c64xx/mach-real6410.c @@ -39,6 +39,7 @@ #include <linux/platform_data/mtd-nand-s3c2410.h> #include <plat/regs-serial.h> #include <linux/platform_data/touchscreen-s3c2410.h> +#include <linux/platform_data/gpio-samsung-s3c64xx.h> #include <video/platform_lcd.h> #include <video/samsung_fimd.h> diff --git a/arch/arm/mach-s3c64xx/mach-smartq.c b/arch/arm/mach-s3c64xx/mach-smartq.c index a6b338fd0470d6b55f0601058f4dc5446cfc480c..0271b3a191e5b24d57d258250664972fc4dbfd3e 100644 --- a/arch/arm/mach-s3c64xx/mach-smartq.c +++ b/arch/arm/mach-s3c64xx/mach-smartq.c @@ -36,6 +36,7 @@ #include <linux/platform_data/usb-ohci-s3c2410.h> #include <plat/sdhci.h> #include <linux/platform_data/touchscreen-s3c2410.h> +#include <linux/platform_data/gpio-samsung-s3c64xx.h> #include <video/platform_lcd.h> #include <plat/samsung-time.h> diff --git a/arch/arm/mach-s3c64xx/mach-smartq5.c b/arch/arm/mach-s3c64xx/mach-smartq5.c index 8aca5daf3d05a10b62184969109c1a59c9744438..15b6c2f98086fd50d7734a6d3a06d7a87fbed022 100644 --- a/arch/arm/mach-s3c64xx/mach-smartq5.c +++ b/arch/arm/mach-s3c64xx/mach-smartq5.c @@ -16,6 +16,7 @@ #include <linux/input.h> #include <linux/leds.h> #include <linux/platform_device.h> +#include <linux/platform_data/gpio-samsung-s3c64xx.h> #include <asm/mach-types.h> #include <asm/mach/arch.h> diff --git a/arch/arm/mach-s3c64xx/mach-smartq7.c b/arch/arm/mach-s3c64xx/mach-smartq7.c index a052e107c0b402a3ac7cab606da610e573ef7618..e3b58942ee686a2e25b6a275b7ec06c7dfe533c6 100644 --- a/arch/arm/mach-s3c64xx/mach-smartq7.c +++ b/arch/arm/mach-s3c64xx/mach-smartq7.c @@ -16,6 +16,7 @@ #include <linux/input.h> #include <linux/leds.h> #include <linux/platform_device.h> +#include <linux/platform_data/gpio-samsung-s3c64xx.h> #include <asm/mach-types.h> #include <asm/mach/arch.h> diff --git a/arch/arm/mach-s3c64xx/mach-smdk6400.c b/arch/arm/mach-s3c64xx/mach-smdk6400.c index 27381cfcabbedbe2a669272d3786f56db08f11ba..bdbbddb803d542bea0d38639c857de5c797f455e 100644 --- a/arch/arm/mach-s3c64xx/mach-smdk6400.c +++ b/arch/arm/mach-s3c64xx/mach-smdk6400.c @@ -35,6 +35,7 @@ #include <plat/devs.h> #include <plat/cpu.h> #include <linux/platform_data/i2c-s3c2410.h> +#include <linux/platform_data/gpio-samsung-s3c64xx.h> #include <plat/samsung-time.h> #include "common.h" diff --git a/arch/arm/mach-s3c64xx/mach-smdk6410.c b/arch/arm/mach-s3c64xx/mach-smdk6410.c index d5ea938cc9a1a03f7b6f884155de620a3fc0c3b3..a8977da87eb1f54cdfa67847b3054987c7b36276 100644 --- a/arch/arm/mach-s3c64xx/mach-smdk6410.c +++ b/arch/arm/mach-s3c64xx/mach-smdk6410.c @@ -31,6 +31,7 @@ #include <linux/regulator/machine.h> #include <linux/pwm_backlight.h> #include <linux/platform_data/s3c-hsotg.h> +#include <linux/platform_data/gpio-samsung-s3c64xx.h> #ifdef CONFIG_SMDK6410_WM1190_EV1 #include <linux/mfd/wm8350/core.h> diff --git a/arch/arm/mach-s3c64xx/pm.c b/arch/arm/mach-s3c64xx/pm.c index 8cdb824a3b432456c39353b64e658ac920e3e353..99c778eecab6e950e01e19bbeda4fb655d6a4b02 100644 --- a/arch/arm/mach-s3c64xx/pm.c +++ b/arch/arm/mach-s3c64xx/pm.c @@ -18,6 +18,7 @@ #include <linux/io.h> #include <linux/gpio.h> #include <linux/pm_domain.h> +#include <linux/platform_data/gpio-samsung-s3c64xx.h> #include <mach/map.h> #include <mach/irqs.h> diff --git a/arch/arm/mach-s3c64xx/setup-fb-24bpp.c b/arch/arm/mach-s3c64xx/setup-fb-24bpp.c index 2cf80026c58d470c5f328da8b6df696fa4514bae..222792691b41ac44258adad642961b7a9885221b 100644 --- a/arch/arm/mach-s3c64xx/setup-fb-24bpp.c +++ b/arch/arm/mach-s3c64xx/setup-fb-24bpp.c @@ -16,6 +16,7 @@ #include <linux/types.h> #include <linux/fb.h> #include <linux/gpio.h> +#include <linux/platform_data/gpio-samsung-s3c64xx.h> #include <plat/fb.h> #include <plat/gpio-cfg.h> diff --git a/arch/arm/mach-s3c64xx/setup-i2c0.c b/arch/arm/mach-s3c64xx/setup-i2c0.c index 40666ba8d607a3cdd8bf71d3aad375331d62fd56..f269dabc9593e2c37c2a6a17122ffe3b6991198b 100644 --- a/arch/arm/mach-s3c64xx/setup-i2c0.c +++ b/arch/arm/mach-s3c64xx/setup-i2c0.c @@ -19,6 +19,7 @@ struct platform_device; /* don't need the contents */ #include <linux/platform_data/i2c-s3c2410.h> +#include <linux/platform_data/gpio-samsung-s3c64xx.h> #include <plat/gpio-cfg.h> void s3c_i2c0_cfg_gpio(struct platform_device *dev) diff --git a/arch/arm/mach-s3c64xx/setup-i2c1.c b/arch/arm/mach-s3c64xx/setup-i2c1.c index 3fdb24c4e62a8fd61957095e90cdea72f203e2cd..aa2bfcd5e818464062a9ace173f746bf52f13081 100644 --- a/arch/arm/mach-s3c64xx/setup-i2c1.c +++ b/arch/arm/mach-s3c64xx/setup-i2c1.c @@ -19,6 +19,7 @@ struct platform_device; /* don't need the contents */ #include <linux/platform_data/i2c-s3c2410.h> +#include <linux/platform_data/gpio-samsung-s3c64xx.h> #include <plat/gpio-cfg.h> void s3c_i2c1_cfg_gpio(struct platform_device *dev) diff --git a/arch/arm/mach-s3c64xx/setup-ide.c b/arch/arm/mach-s3c64xx/setup-ide.c index 648d8b85bf6b20df6ea4324cb08e837254593c94..81dcebeaeb5392387150b568ce399ae630b48626 100644 --- a/arch/arm/mach-s3c64xx/setup-ide.c +++ b/arch/arm/mach-s3c64xx/setup-ide.c @@ -18,6 +18,7 @@ #include <mach/regs-clock.h> #include <plat/gpio-cfg.h> #include <linux/platform_data/ata-samsung_cf.h> +#include <linux/platform_data/gpio-samsung-s3c64xx.h> void s3c64xx_ide_setup_gpio(void) { diff --git a/arch/arm/mach-s3c64xx/setup-keypad.c b/arch/arm/mach-s3c64xx/setup-keypad.c index 1d4d0ee9e8704160dd99e452438cefcaba8b23e5..e236f40c905320df9e34318e98ceb2dde6af8e32 100644 --- a/arch/arm/mach-s3c64xx/setup-keypad.c +++ b/arch/arm/mach-s3c64xx/setup-keypad.c @@ -11,6 +11,7 @@ */ #include <linux/gpio.h> +#include <linux/platform_data/gpio-samsung-s3c64xx.h> #include <plat/gpio-cfg.h> #include <plat/keypad.h> diff --git a/arch/arm/mach-s3c64xx/setup-sdhci-gpio.c b/arch/arm/mach-s3c64xx/setup-sdhci-gpio.c index 6eac071afae2afe47b44d18d4ef253c538a65d3a..79192b7217df3ab0575b1a48f07abff554117a53 100644 --- a/arch/arm/mach-s3c64xx/setup-sdhci-gpio.c +++ b/arch/arm/mach-s3c64xx/setup-sdhci-gpio.c @@ -17,6 +17,7 @@ #include <linux/platform_device.h> #include <linux/io.h> #include <linux/gpio.h> +#include <linux/platform_data/gpio-samsung-s3c64xx.h> #include <plat/gpio-cfg.h> #include <plat/sdhci.h> diff --git a/arch/arm/mach-s3c64xx/setup-spi.c b/arch/arm/mach-s3c64xx/setup-spi.c index 4dc53450d71547f3ea4137092354682006a16962..dad4728ccb5282e731c594a13e25660b13e24f2a 100644 --- a/arch/arm/mach-s3c64xx/setup-spi.c +++ b/arch/arm/mach-s3c64xx/setup-spi.c @@ -9,6 +9,7 @@ */ #include <linux/gpio.h> +#include <linux/platform_data/gpio-samsung-s3c64xx.h> #include <plat/gpio-cfg.h> #ifdef CONFIG_S3C64XX_DEV_SPI0 diff --git a/arch/arm/plat-samsung/pm-gpio.c b/arch/arm/plat-samsung/pm-gpio.c index 41fef698023023bef290b10fd5a86a05d103bf64..c4efa1c2a5d1f163c91264dc2b633dfb666f7bde 100644 --- a/arch/arm/plat-samsung/pm-gpio.c +++ b/arch/arm/plat-samsung/pm-gpio.c @@ -22,6 +22,9 @@ #ifdef CONFIG_ARCH_S3C24XX #include <linux/platform_data/gpio-samsung-s3c24xx.h> #endif +#ifdef CONFIG_ARCH_S3C64XX +#include <linux/platform_data/gpio-samsung-s3c64xx.h> +#endif #include <plat/gpio-core.h> #include <plat/pm.h> diff --git a/drivers/gpio/gpio-samsung.c b/drivers/gpio/gpio-samsung.c index 268214c577997dd4617f0c8c43ef671146ad6e96..be7b0bd4eed467b00cf73b2f4584f28967f84679 100644 --- a/drivers/gpio/gpio-samsung.c +++ b/drivers/gpio/gpio-samsung.c @@ -30,6 +30,9 @@ #ifdef CONFIG_ARCH_S3C24XX #include <linux/platform_data/gpio-samsung-s3c24xx.h> #endif +#ifdef CONFIG_ARCH_S3C64XX +#include <linux/platform_data/gpio-samsung-s3c64xx.h> +#endif #include <asm/irq.h> diff --git a/arch/arm/mach-s3c64xx/include/mach/gpio.h b/include/linux/platform_data/gpio-samsung-s3c64xx.h similarity index 95% rename from arch/arm/mach-s3c64xx/include/mach/gpio.h rename to include/linux/platform_data/gpio-samsung-s3c64xx.h index 8b540c42d5ddeae84b79efb650bdc9989406194b..9c81fac3b2d5f46605185718c2c0e560c185169b 100644 --- a/arch/arm/mach-s3c64xx/include/mach/gpio.h +++ b/include/linux/platform_data/gpio-samsung-s3c64xx.h @@ -1,5 +1,4 @@ -/* arch/arm/mach-s3c6400/include/mach/gpio.h - * +/* * Copyright 2008 Openmoko, Inc. * Copyright 2008 Simtec Electronics * http://armlinux.simtec.co.uk/ @@ -12,6 +11,9 @@ * published by the Free Software Foundation. */ +#ifndef GPIO_SAMSUNG_S3C64XX_H +#define GPIO_SAMSUNG_S3C64XX_H + /* GPIO bank sizes */ #define S3C64XX_GPIO_A_NR (8) #define S3C64XX_GPIO_B_NR (7) @@ -88,6 +90,5 @@ enum s3c_gpio_number { /* define the number of gpios we need to the one after the GPQ() range */ #define GPIO_BOARD_START (S3C64XX_GPQ(S3C64XX_GPIO_Q_NR) + 1) -#define BOARD_NR_GPIOS (16 + CONFIG_SAMSUNG_GPIO_EXTRA) +#endif /* GPIO_SAMSUNG_S3C64XX_H */ -#define ARCH_NR_GPIOS (GPIO_BOARD_START + BOARD_NR_GPIOS)