aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBen Dooks <ben-linux@fluff.org>2008-11-10 05:59:32 -0500
committerBen Dooks <ben-linux@fluff.org>2008-12-18 09:43:07 -0500
commite2178d437460dafaaae89926088523432eb4de53 (patch)
treefe14348512ccfa934eead187f315c2bde8d72f48
parent8783b3446ba33a1cdd43f7eaa4ad6a1b73502a1a (diff)
[ARM] S3C24XX: Add extra GPIOs via Kconfig
Add Kconfig entries to allow more GPIO space to be specified depending on the machine(s) selected. Signed-off-by: Ben Dooks <ben-linux@fluff.org>
-rw-r--r--arch/arm/mach-s3c2410/include/mach/gpio.h6
-rw-r--r--arch/arm/mach-s3c2440/Kconfig2
-rw-r--r--arch/arm/plat-s3c24xx/Kconfig21
3 files changed, 29 insertions, 0 deletions
diff --git a/arch/arm/mach-s3c2410/include/mach/gpio.h b/arch/arm/mach-s3c2410/include/mach/gpio.h
index 3b52b86498a6..e0349af8a483 100644
--- a/arch/arm/mach-s3c2410/include/mach/gpio.h
+++ b/arch/arm/mach-s3c2410/include/mach/gpio.h
@@ -15,4 +15,10 @@
15#define gpio_set_value __gpio_set_value 15#define gpio_set_value __gpio_set_value
16#define gpio_cansleep __gpio_cansleep 16#define gpio_cansleep __gpio_cansleep
17 17
18/* some boards require extra gpio capacity to support external
19 * devices that need GPIO.
20 */
21
22#define ARCH_NR_GPIOS (256 + CONFIG_S3C24XX_GPIO_EXTRA)
23
18#include <asm-generic/gpio.h> 24#include <asm-generic/gpio.h>
diff --git a/arch/arm/mach-s3c2440/Kconfig b/arch/arm/mach-s3c2440/Kconfig
index 0429d255b0d8..402213dc5d85 100644
--- a/arch/arm/mach-s3c2440/Kconfig
+++ b/arch/arm/mach-s3c2440/Kconfig
@@ -31,6 +31,7 @@ config MACH_ANUBIS
31 select CPU_S3C2440 31 select CPU_S3C2440
32 select PM_SIMTEC if PM 32 select PM_SIMTEC if PM
33 select HAVE_PATA_PLATFORM 33 select HAVE_PATA_PLATFORM
34 select S3C24XX_GPIO_EXTRA64
34 help 35 help
35 Say Y here if you are using the Simtec Electronics ANUBIS 36 Say Y here if you are using the Simtec Electronics ANUBIS
36 development system 37 development system
@@ -39,6 +40,7 @@ config MACH_OSIRIS
39 bool "Simtec IM2440D20 (OSIRIS) module" 40 bool "Simtec IM2440D20 (OSIRIS) module"
40 select CPU_S3C2440 41 select CPU_S3C2440
41 select PM_SIMTEC if PM 42 select PM_SIMTEC if PM
43 select S3C24XX_GPIO_EXTRA128
42 help 44 help
43 Say Y here if you are using the Simtec IM2440D20 module, also 45 Say Y here if you are using the Simtec IM2440D20 module, also
44 known as the Osiris. 46 known as the Osiris.
diff --git a/arch/arm/plat-s3c24xx/Kconfig b/arch/arm/plat-s3c24xx/Kconfig
index 0af3872fb763..7fe28aaa08ca 100644
--- a/arch/arm/plat-s3c24xx/Kconfig
+++ b/arch/arm/plat-s3c24xx/Kconfig
@@ -28,6 +28,27 @@ config S3C24XX_PWM
28 Support for exporting the PWM timer blocks via the pwm device 28 Support for exporting the PWM timer blocks via the pwm device
29 system. 29 system.
30 30
31
32# gpio configurations
33
34config S3C24XX_GPIO_EXTRA
35 int
36 default 128 if S3C24XX_GPIO_EXTRA128
37 default 64 if S3C24XX_GPIO_EXTRA64
38 default 0
39
40config S3C24XX_GPIO_EXTRA64
41 bool
42 help
43 Add an extra 64 gpio numbers to the available GPIO pool. This is
44 available for boards that need extra gpios for external devices.
45
46config S3C24XX_GPIO_EXTRA128
47 bool
48 help
49 Add an extra 128 gpio numbers to the available GPIO pool. This is
50 available for boards that need extra gpios for external devices.
51
31config PM_SIMTEC 52config PM_SIMTEC
32 bool 53 bool
33 help 54 help