[U-Boot-Users] [PATCH] ppc: Allow boards to specify how much memory they can map

Kumar Gala galak at kernel.crashing.org
Fri Feb 15 22:16:18 CET 2008


For historical reasons we limited the stack to 256M because some boards
could only map that much via BATS.  However newer boards are capable of
mapping more memory (for example 85xx is capble of doing up to 2G).

Signed-off-by: Kumar Gala <galak at kernel.crashing.org>
---
 lib_ppc/board.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/lib_ppc/board.c b/lib_ppc/board.c
index 45d1328..8c9f6e6 100644
--- a/lib_ppc/board.c
+++ b/lib_ppc/board.c
@@ -419,12 +419,17 @@ void board_init_f (ulong bootflag)
 	 */
 	len = (ulong)&_end - CFG_MONITOR_BASE;

+#ifndef CONFIG_MAX_MEM_MAPPED
+#define CONFIG_MAX_MEM_MAPPED (256 << 20)
+#endif
+
 #ifndef	CONFIG_VERY_BIG_RAM
 	addr = CFG_SDRAM_BASE + gd->ram_size;
 #else
 	/* only allow stack below 256M */
 	addr = CFG_SDRAM_BASE +
-	       (gd->ram_size > 256 << 20) ? 256 << 20 : gd->ram_size;
+		(gd->ram_size > CONFIG_MAX_MEM_MAPPED) ?
+		CONFIG_MAX_MEM_MAPPED : gd->ram_size;
 #endif

 #ifdef CONFIG_LOGBUFFER
-- 
1.5.3.8





More information about the U-Boot mailing list