OSDN Git Service

ARM: Allow Kconfig to control the definition of NR_BANKS
authorRussell King <rmk+kernel@arm.linux.org.uk>
Sun, 11 Dec 2011 10:04:00 +0000 (10:04 +0000)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Tue, 13 Dec 2011 08:52:02 +0000 (08:52 +0000)
Move the sizing of NR_BANKS to a Kconfig control instead of selecting
it in a header file depending on platform selection.  This allows new
additions to its dependencies to be handled more gracefully.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
arch/arm/Kconfig
arch/arm/include/asm/setup.h

index e084b7e..928cbcc 100644 (file)
@@ -1125,6 +1125,11 @@ config ARM_TIMER_SP804
 
 source arch/arm/mm/Kconfig
 
+config ARM_NR_BANKS
+       int
+       default 16 if ARCH_EP93XX
+       default 8
+
 config IWMMXT
        bool "Enable iWMMXt support"
        depends on CPU_XSCALE || CPU_XSC3 || CPU_MOHAWK || CPU_PJ4
index 915696d..23ebc0c 100644 (file)
@@ -192,11 +192,7 @@ static const struct tagtable __tagtable_##fn __tag = { tag, fn }
 /*
  * Memory map description
  */
-#ifdef CONFIG_ARCH_EP93XX
-# define NR_BANKS 16
-#else
-# define NR_BANKS 8
-#endif
+#define NR_BANKS       CONFIG_ARM_NR_BANKS
 
 struct membank {
        phys_addr_t start;