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

From: Kumar Gala <hidden>
Date: 2008-02-15 21:16:18
Subsystem: the rest · Maintainer: Linus Torvalds

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 <redacted>
---
 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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help