Skip to content
Snippets Groups Projects
Commit f96b44ce authored by Remy Bohmer's avatar Remy Bohmer Committed by Wolfgang Denk
Browse files

ARM: set GD_FLG_RELOC for boards skipping relocation to RAM


If CONFIG_SKIP_RELOCATE_UBOOT is set the flag GD_FLG_RELOC is usually
never set, because relocation to RAM is actually never done by U-boot
itself. However, several pieces of code check if this flag is set at
some time.

So, to make sure this flag is set on boards skipping relocation, this
is added to the initialisation of U-boot at a moment where it is safe
to do so.

Signed-off-by: default avatarRemy Bohmer <linux@bohmer.net>
parent e4dafff8
No related branches found
No related tags found
No related merge requests found
......@@ -233,6 +233,18 @@ static int init_func_i2c (void)
}
#endif
#ifdef CONFIG_SKIP_RELOCATE_UBOOT
/*
* This routine sets the relocation done flag, because even if
* relocation is skipped, the flag is used by other generic code.
*/
static int reloc_init(void)
{
gd->flags |= GD_FLG_RELOC;
return 0;
}
#endif
/*
* Breathe some life into the board...
*
......@@ -262,6 +274,11 @@ int print_cpuinfo (void); /* test-only */
init_fnc_t *init_sequence[] = {
cpu_init, /* basic cpu dependent setup */
#if defined(CONFIG_SKIP_RELOCATE_UBOOT)
reloc_init, /* Set the relocation done flag, must
do this AFTER cpu_init(), but as soon
as possible */
#endif
board_init, /* basic board dependent setup */
interrupt_init, /* set up exceptions */
env_init, /* initialize environment */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment