summaryrefslogtreecommitdiff
path: root/arch/powerpc/lib
diff options
context:
space:
mode:
authorWolfgang Denk <wd@denx.de>2010-12-16 23:00:53 +0100
committerWolfgang Denk <wd@denx.de>2010-12-16 23:00:53 +0100
commit006915fbb0e3c1c9927fe32c4e92cb011f8499e7 (patch)
treeb477df920f7d638a0472aa1d6bfa5ff71243448c /arch/powerpc/lib
parent98e69567022eb2138dd99554b3a2e80522a1b153 (diff)
parentb5d58d8500bfb918c7fec56f241e6ee1078c2be0 (diff)
downloadu-boot-imx-006915fbb0e3c1c9927fe32c4e92cb011f8499e7.zip
u-boot-imx-006915fbb0e3c1c9927fe32c4e92cb011f8499e7.tar.gz
u-boot-imx-006915fbb0e3c1c9927fe32c4e92cb011f8499e7.tar.bz2
Merge branch 'master' of ../master into next
Diffstat (limited to 'arch/powerpc/lib')
-rw-r--r--arch/powerpc/lib/board.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/arch/powerpc/lib/board.c b/arch/powerpc/lib/board.c
index b21c1d6..9759e23 100644
--- a/arch/powerpc/lib/board.c
+++ b/arch/powerpc/lib/board.c
@@ -645,6 +645,17 @@ void board_init_r (gd_t *id, ulong dest_addr)
gd->cpu += dest_addr - CONFIG_SYS_MONITOR_BASE;
#endif
+#ifdef CONFIG_SYS_EXTRA_ENV_RELOC
+ /*
+ * Some systems need to relocate the env_addr pointer early because the
+ * location it points to will get invalidated before env_relocate is
+ * called. One example is on systems that might use a L2 or L3 cache
+ * in SRAM mode and initialize that cache from SRAM mode back to being
+ * a cache in cpu_init_r.
+ */
+ gd->env_addr += dest_addr - CONFIG_SYS_MONITOR_BASE;
+#endif
+
#ifdef CONFIG_SERIAL_MULTI
serial_initialize();
#endif