summaryrefslogtreecommitdiff
path: root/lib_arm
diff options
context:
space:
mode:
authorRemy Bohmer <linux@bohmer.net>2008-07-22 16:22:11 +0200
committerWolfgang Denk <wd@denx.de>2008-07-30 00:13:04 +0200
commitf96b44cef897bd372beb86dde1b33637c119d84d (patch)
tree57b90c23ffa4dede41b250a3c7ca1bdb54d342cc /lib_arm
parente4dafff86f289b5677143a3e41da7b45c6d27fc7 (diff)
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: Remy Bohmer <linux@bohmer.net>
Diffstat (limited to 'lib_arm')
-rw-r--r--lib_arm/board.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/lib_arm/board.c b/lib_arm/board.c
index 80b149b534a..a09386046c3 100644
--- a/lib_arm/board.c
+++ b/lib_arm/board.c
@@ -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 */