diff options
author | Peter De Schrijver (NVIDIA) <pdeschrijver@nvidia.com> | 2011-12-21 04:48:45 -0500 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2011-12-23 17:54:50 -0500 |
commit | 44986ab056076e9dc9fb9f8b4729afef7fa72616 (patch) | |
tree | ea8231c1bd85cb97daa89b3fe377a0a537ad24fa | |
parent | 7c324d837f214290febac87da6815dff1ed41d04 (diff) |
ARM: 7240/1: Make ARCH_NR_GPIO a Kconfig variable
Change ARCH_NR_GPIO into a Kconfig variable as suggested by Russel King.
This makes ARCH_NR_GPIO single zImage friendly. The default value for
tegra is defined as well.
Signed-off-by: Peter De Schrijver <pdeschrijver@nvidia.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
-rw-r--r-- | arch/arm/Kconfig | 9 | ||||
-rw-r--r-- | arch/arm/include/asm/gpio.h | 4 |
2 files changed, 13 insertions, 0 deletions
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index e063d34ac7b9..003b7d00dd60 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig | |||
@@ -1565,6 +1565,15 @@ config LOCAL_TIMERS | |||
1565 | accounting to be spread across the timer interval, preventing a | 1565 | accounting to be spread across the timer interval, preventing a |
1566 | "thundering herd" at every timer tick. | 1566 | "thundering herd" at every timer tick. |
1567 | 1567 | ||
1568 | config ARCH_NR_GPIO | ||
1569 | int | ||
1570 | default 1024 if ARCH_TEGRA | ||
1571 | default 0 | ||
1572 | help | ||
1573 | Maximum number of GPIOs in the system. | ||
1574 | |||
1575 | If unsure, leave the default value. | ||
1576 | |||
1568 | source kernel/Kconfig.preempt | 1577 | source kernel/Kconfig.preempt |
1569 | 1578 | ||
1570 | config HZ | 1579 | config HZ |
diff --git a/arch/arm/include/asm/gpio.h b/arch/arm/include/asm/gpio.h index 11ad0bfbb0ad..7151753b0989 100644 --- a/arch/arm/include/asm/gpio.h +++ b/arch/arm/include/asm/gpio.h | |||
@@ -1,6 +1,10 @@ | |||
1 | #ifndef _ARCH_ARM_GPIO_H | 1 | #ifndef _ARCH_ARM_GPIO_H |
2 | #define _ARCH_ARM_GPIO_H | 2 | #define _ARCH_ARM_GPIO_H |
3 | 3 | ||
4 | #if CONFIG_ARCH_NR_GPIO > 0 | ||
5 | #define ARCH_NR_GPIO CONFIG_ARCH_NR_GPIO | ||
6 | #endif | ||
7 | |||
4 | /* not all ARM platforms necessarily support this API ... */ | 8 | /* not all ARM platforms necessarily support this API ... */ |
5 | #include <mach/gpio.h> | 9 | #include <mach/gpio.h> |
6 | 10 | ||