summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2013-03-05 14:39:45 +0000
committerTom Rini <trini@ti.com>2013-03-15 16:13:59 -0400
commit8cae8a68ed3e6182241960c5520daf40345296bd (patch)
treebd356ebc84196192c2b9a94e2531e7db4c43aad6 /common
parent6f6430d72b007128dd159e5200edb9f576a10bf9 (diff)
downloadu-boot-8cae8a68ed3e6182241960c5520daf40345296bd.tar.gz
u-boot-8cae8a68ed3e6182241960c5520daf40345296bd.tar.bz2
u-boot-8cae8a68ed3e6182241960c5520daf40345296bd.zip
Add spl load feature
This adds secondary program loader support to the generic board. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'common')
-rw-r--r--common/board_f.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/common/board_f.c b/common/board_f.c
index d674f9d509..42042ccc06 100644
--- a/common/board_f.c
+++ b/common/board_f.c
@@ -312,6 +312,7 @@ static int reserve_uboot(void)
return 0;
}
+#ifndef CONFIG_SPL_BUILD
/* reserve memory for malloc() area */
static int reserve_malloc(void)
{
@@ -331,6 +332,7 @@ static int reserve_board(void)
sizeof(bd_t), gd->dest_addr_sp);
return 0;
}
+#endif
static int setup_machine(void)
{
@@ -370,6 +372,13 @@ static int reserve_fdt(void)
static int reserve_stacks(void)
{
+#ifdef CONFIG_SPL_BUILD
+# ifdef CONFIG_ARM
+ gd->dest_addr_sp -= 128; /* leave 32 words for abort-stack */
+ gd->irq_sp = gd->dest_addr_sp;
+# endif
+#else
+
/* setup stack pointer for exceptions */
gd->dest_addr_sp -= 16;
gd->dest_addr_sp &= ~0xf;
@@ -391,8 +400,10 @@ static int reserve_stacks(void)
# endif
/* leave 3 words for abort-stack, plus 1 for alignment */
gd->dest_addr_sp -= 16;
+# endif /* Architecture specific code */
return 0;
+#endif
}
static int display_new_sp(void)
@@ -537,8 +548,10 @@ static init_fnc_t init_sequence_f[] = {
reserve_lcd,
#endif
reserve_uboot,
+#ifndef CONFIG_SPL_BUILD
reserve_malloc,
reserve_board,
+#endif
setup_machine,
reserve_global_data,
reserve_fdt,