mirror of
https://github.com/Stichting-MINIX-Research-Foundation/u-boot.git
synced 2025-09-14 14:36:33 -04:00
Add spl load feature
This adds secondary program loader support to the generic board. Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
6f6430d72b
commit
8cae8a68ed
@ -312,6 +312,7 @@ static int reserve_uboot(void)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef CONFIG_SPL_BUILD
|
||||||
/* reserve memory for malloc() area */
|
/* reserve memory for malloc() area */
|
||||||
static int reserve_malloc(void)
|
static int reserve_malloc(void)
|
||||||
{
|
{
|
||||||
@ -331,6 +332,7 @@ static int reserve_board(void)
|
|||||||
sizeof(bd_t), gd->dest_addr_sp);
|
sizeof(bd_t), gd->dest_addr_sp);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
static int setup_machine(void)
|
static int setup_machine(void)
|
||||||
{
|
{
|
||||||
@ -370,6 +372,13 @@ static int reserve_fdt(void)
|
|||||||
|
|
||||||
static int reserve_stacks(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 */
|
/* setup stack pointer for exceptions */
|
||||||
gd->dest_addr_sp -= 16;
|
gd->dest_addr_sp -= 16;
|
||||||
gd->dest_addr_sp &= ~0xf;
|
gd->dest_addr_sp &= ~0xf;
|
||||||
@ -391,8 +400,10 @@ static int reserve_stacks(void)
|
|||||||
# endif
|
# endif
|
||||||
/* leave 3 words for abort-stack, plus 1 for alignment */
|
/* leave 3 words for abort-stack, plus 1 for alignment */
|
||||||
gd->dest_addr_sp -= 16;
|
gd->dest_addr_sp -= 16;
|
||||||
|
# endif /* Architecture specific code */
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
static int display_new_sp(void)
|
static int display_new_sp(void)
|
||||||
@ -537,8 +548,10 @@ static init_fnc_t init_sequence_f[] = {
|
|||||||
reserve_lcd,
|
reserve_lcd,
|
||||||
#endif
|
#endif
|
||||||
reserve_uboot,
|
reserve_uboot,
|
||||||
|
#ifndef CONFIG_SPL_BUILD
|
||||||
reserve_malloc,
|
reserve_malloc,
|
||||||
reserve_board,
|
reserve_board,
|
||||||
|
#endif
|
||||||
setup_machine,
|
setup_machine,
|
||||||
reserve_global_data,
|
reserve_global_data,
|
||||||
reserve_fdt,
|
reserve_fdt,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user