summaryrefslogtreecommitdiff
path: root/arch/powerpc
diff options
context:
space:
mode:
authorKumar Gala <galak@kernel.crashing.org>2010-11-29 14:32:11 -0600
committerWolfgang Denk <wd@denx.de>2010-11-30 22:09:09 +0100
commita55bb8340ba8682782f816f0b9b3de13e5512e28 (patch)
treeeb4249c9415901569a60f0beb35bf12f018d2a2d /arch/powerpc
parent83b622aa886406d07b9e890cb699c35eea1ea412 (diff)
downloadu-boot-imx-a55bb8340ba8682782f816f0b9b3de13e5512e28.zip
u-boot-imx-a55bb8340ba8682782f816f0b9b3de13e5512e28.tar.gz
u-boot-imx-a55bb8340ba8682782f816f0b9b3de13e5512e28.tar.bz2
powerpc/85xx: Introduce 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. We set this on the 85xx boards that have support for NAND, SPI, or SDHC/MMC boot support as they use a secondary cache in SRAM mode and need the env_addr pointer relocated since we change from SRAM to normal cache mode in cpu_init_r. Also removed CONFIG_SYS_SPL as its not used anywhere. Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc')
-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