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

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@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

In message Pine.LNX.4.64.0802151515540.13446@blarg.am.freescale.net you wrote:
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@kernel.crashing.org
lib_ppc/board.c | 7 ++++++- 1 files changed, 6 insertions(+), 1 deletions(-)
Applied, after resoving merge conflicts.
Please check if everythign is OK.
Best regards,
Wolfgang Denk
participants (2)
-
Kumar Gala
-
Wolfgang Denk