]> rtime.felk.cvut.cz Git - can-eth-gw-linux.git/commitdiff
ARM: 7240/1: Make ARCH_NR_GPIO a Kconfig variable
authorPeter De Schrijver (NVIDIA) <pdeschrijver@nvidia.com>
Wed, 21 Dec 2011 09:48:45 +0000 (10:48 +0100)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Fri, 23 Dec 2011 22:54:50 +0000 (22:54 +0000)
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>
arch/arm/Kconfig
arch/arm/include/asm/gpio.h

index e063d34ac7b9115608e86667b3f98566e2aaf39d..003b7d00dd60612adf5ef3cd8f2fefe599b4f2ba 100644 (file)
@@ -1565,6 +1565,15 @@ config LOCAL_TIMERS
          accounting to be spread across the timer interval, preventing a
          "thundering herd" at every timer tick.
 
+config ARCH_NR_GPIO
+       int
+       default 1024 if ARCH_TEGRA
+       default 0
+       help
+         Maximum number of GPIOs in the system.
+
+         If unsure, leave the default value.
+
 source kernel/Kconfig.preempt
 
 config HZ
index 11ad0bfbb0ad67ca3c3865d25a216b22a13c10f5..7151753b0989f922c5a0e9d29fce5e057ae2ad5e 100644 (file)
@@ -1,6 +1,10 @@
 #ifndef _ARCH_ARM_GPIO_H
 #define _ARCH_ARM_GPIO_H
 
+#if CONFIG_ARCH_NR_GPIO > 0
+#define ARCH_NR_GPIO CONFIG_ARCH_NR_GPIO
+#endif
+
 /* not all ARM platforms necessarily support this API ... */
 #include <mach/gpio.h>