Skip to content

Commit

Permalink
ARM: 7240/1: Make ARCH_NR_GPIO a Kconfig variable
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Peter De Schrijver (NVIDIA) authored and Russell King committed Dec 23, 2011
1 parent 7c324d8 commit 44986ab
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
9 changes: 9 additions & 0 deletions arch/arm/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 4 additions & 0 deletions arch/arm/include/asm/gpio.h
Original file line number Diff line number Diff line change
@@ -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>

Expand Down

0 comments on commit 44986ab

Please sign in to comment.