summaryrefslogtreecommitdiff
path: root/lib_ppc/board.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib_ppc/board.c')
-rw-r--r--lib_ppc/board.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/lib_ppc/board.c b/lib_ppc/board.c
index ee0213e..3038302 100644
--- a/lib_ppc/board.c
+++ b/lib_ppc/board.c
@@ -38,6 +38,9 @@
#if defined(CONFIG_CMD_IDE)
#include <ide.h>
#endif
+#if defined(CONFIG_CMD_SATA)
+#include <sata.h>
+#endif
#if defined(CONFIG_CMD_SCSI)
#include <scsi.h>
#endif
@@ -433,7 +436,18 @@ 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 + get_effective_memsize();
+#else
+ /* only allow stack below 256M */
+ addr = CFG_SDRAM_BASE +
+ (gd->ram_size > CONFIG_MAX_MEM_MAPPED) ?
+ CONFIG_MAX_MEM_MAPPED : get_effective_memsize();
+#endif
#ifdef CONFIG_LOGBUFFER
#ifndef CONFIG_ALT_LB_ADDR
@@ -1093,6 +1107,11 @@ void board_init_r (gd_t *id, ulong dest_addr)
#endif
#endif
+#if defined(CONFIG_CMD_SATA)
+ puts ("SATA: ");
+ sata_initialize ();
+#endif
+
#ifdef CONFIG_LAST_STAGE_INIT
WATCHDOG_RESET ();
/*