Skip to contentSkip to conversation

ARM: MM: Configure the number of banks

PATCH New Boojin Kim 2 participants 4 messages Dec 5, 2011 – Dec 12, 2011

Subsystems (4)
lore
Share & tools
lore

Boojin Kim

author
#0 lore raw

PATCH 1/1 ARM: MM: Configure the number of banks

This patch configures NR_BANKS by machine specific configuration. NR_BANKS should be increased to support bigger than 2GB memory.

---
 arch/arm/include/asm/setup.h               |    6 ++----
 arch/arm/mach-ep93xx/include/mach/memory.h |    4 ++++
 arch/arm/mach-exynos/include/mach/memory.h |    4 ++++
 3 files changed, 10 insertions(+), 4 deletions(-)
arch/arm/include/asm/setup.h +2 -4
index 915696d..b91ec39 100644
@@ -192,10 +192,8 @@ 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
+#ifndef NR_BANKS
+#define NR_BANKS 8
 #endif
 
 struct membank {
arch/arm/mach-ep93xx/include/mach/memory.h +4 -0
index c9400cf..2c0462e 100644
@@ -19,4 +19,8 @@
 #error "Kconfig bug: No EP93xx PHYS_OFFSET set"
 #endif
 
+#if defined(CONFIG_ARCH_EP93XX)
+#define NR_BANKS		16
+#endif
+
 #endif
arch/arm/mach-exynos/include/mach/memory.h +4 -0
index 374ef2c..b7e146c 100644
@@ -15,6 +15,10 @@
 
 #define PLAT_PHYS_OFFSET		UL(0x40000000)
 
+#if defined(CONFIG_MACH_SMDKV310)
+#define NR_BANKS		16
+#endif
+
 /* Maximum of 256MiB in one bank */
 #define MAX_PHYSMEM_BITS	32
 #define SECTION_SIZE_BITS	28
Signature · 1 line
1.7.1
#1 lore raw

PATCH 1/1 ARM: MM: Configure the number of banks

Quoted 4 lines · Boojin Kim

This patch configures NR_BANKS by machine specific configuration. NR_BANKS should be increased to support bigger than 2GB memory.

I'd much prefer to solve this a different way:

arch/arm/Kconfig +5 -0
index 4676c19..d451945 100644
@@ -1126,6 +1126,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
arch/arm/include/asm/setup.h +1 -5
index 915696d..23ebc0c 100644
@@ -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;

so we don't introduce new dependencies for having a mach/memory.h.

#2 lore raw

PATCH 1/1 ARM: MM: Configure the number of banks

Quoted 13 lines · Russell King - ARM Linux
Quoted 4 lines · Boojin Kim

This patch configures NR_BANKS by machine specific configuration. NR_BANKS should be increased to support bigger than 2GB memory.

I'd much prefer to solve this a different way:

arch/arm/Kconfig +0 -0
index 4676c19..d451945 100644

arch/arm/Kconfig config ARM_TIMER_SP804 · line 1131

Quoted 6 lines
arch/arm/Kconfig +3 -0
@@ -1126,6 +1126,11 @@ config ARM_TIMER_SP804
 
 source arch/arm/mm/Kconfig
 
+config ARM_NR_BANKS
+	int
+	default 16 if ARCH_EP93XX

I've now committed this patch - if you want to add exynos to this, please send a patch to do just that. Thanks.

author
#3 lore raw

PATCH 1/1 ARM: MM: Configure the number of banks

Quoted 9 lines · Russell King

arch/arm/Kconfig config ARM_TIMER_SP804 · line 1131

Quoted 6 lines

source arch/arm/mm/Kconfig

arch/arm/Kconfig +3 -0
+config ARM_NR_BANKS
+	int
+	default 16 if ARCH_EP93XX

I've now committed this patch - if you want to add exynos to this, please send a patch to do just that. Thanks.

It's good to me.
Thank you for review !