Skip to content

Commit

Permalink
[ARM] S3C24XX: Add extra GPIOs via Kconfig
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Ben Dooks committed Dec 18, 2008
1 parent 8783b34 commit e2178d4
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 0 deletions.
6 changes: 6 additions & 0 deletions arch/arm/mach-s3c2410/include/mach/gpio.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,10 @@
#define gpio_set_value __gpio_set_value
#define gpio_cansleep __gpio_cansleep

/* some boards require extra gpio capacity to support external
* devices that need GPIO.
*/

#define ARCH_NR_GPIOS (256 + CONFIG_S3C24XX_GPIO_EXTRA)

#include <asm-generic/gpio.h>
2 changes: 2 additions & 0 deletions arch/arm/mach-s3c2440/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ config MACH_ANUBIS
select CPU_S3C2440
select PM_SIMTEC if PM
select HAVE_PATA_PLATFORM
select S3C24XX_GPIO_EXTRA64
help
Say Y here if you are using the Simtec Electronics ANUBIS
development system
Expand All @@ -39,6 +40,7 @@ config MACH_OSIRIS
bool "Simtec IM2440D20 (OSIRIS) module"
select CPU_S3C2440
select PM_SIMTEC if PM
select S3C24XX_GPIO_EXTRA128
help
Say Y here if you are using the Simtec IM2440D20 module, also
known as the Osiris.
Expand Down
21 changes: 21 additions & 0 deletions arch/arm/plat-s3c24xx/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,27 @@ config S3C24XX_PWM
Support for exporting the PWM timer blocks via the pwm device
system.


# gpio configurations

config S3C24XX_GPIO_EXTRA
int
default 128 if S3C24XX_GPIO_EXTRA128
default 64 if S3C24XX_GPIO_EXTRA64
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 PM_SIMTEC
bool
help
Expand Down

0 comments on commit e2178d4

Please sign in to comment.