summaryrefslogtreecommitdiff
path: root/common/board_r.c
diff options
context:
space:
mode:
Diffstat (limited to 'common/board_r.c')
-rw-r--r--common/board_r.c17
1 files changed, 13 insertions, 4 deletions
diff --git a/common/board_r.c b/common/board_r.c
index 3618acad437..e45003353f7 100644
--- a/common/board_r.c
+++ b/common/board_r.c
@@ -155,7 +155,7 @@ static int initr_reloc_global_data(void)
* The fdt_blob needs to be moved to new relocation address
* incase of FDT blob is embedded with in image
*/
- if (CONFIG_IS_ENABLED(OF_EMBED) && CONFIG_IS_ENABLED(NEEDS_MANUAL_RELOC))
+ if (IS_ENABLED(CONFIG_OF_EMBED) && IS_ENABLED(CONFIG_NEEDS_MANUAL_RELOC))
gd->fdt_blob += gd->reloc_off;
#ifdef CONFIG_EFI_LOADER
@@ -452,8 +452,8 @@ static int initr_env(void)
env_set_hex("fdtcontroladdr",
(unsigned long)map_to_sysmem(gd->fdt_blob));
- #if (CONFIG_IS_ENABLED(SAVE_PREV_BL_INITRAMFS_START_ADDR) || \
- CONFIG_IS_ENABLED(SAVE_PREV_BL_FDT_ADDR))
+ #if (IS_ENABLED(CONFIG_SAVE_PREV_BL_INITRAMFS_START_ADDR) || \
+ IS_ENABLED(CONFIG_SAVE_PREV_BL_FDT_ADDR))
save_prev_bl_data();
#endif
@@ -609,7 +609,7 @@ static init_fnc_t init_sequence_r[] = {
*/
#endif
initr_reloc_global_data,
-#if CONFIG_IS_ENABLED(NEEDS_MANUAL_RELOC) && CONFIG_IS_ENABLED(EVENT)
+#if IS_ENABLED(CONFIG_NEEDS_MANUAL_RELOC) && CONFIG_IS_ENABLED(EVENT)
event_manual_reloc,
#endif
#if defined(CONFIG_SYS_INIT_RAM_LOCK) && defined(CONFIG_E500)
@@ -797,6 +797,15 @@ static init_fnc_t init_sequence_r[] = {
void board_init_r(gd_t *new_gd, ulong dest_addr)
{
/*
+ * The pre-relocation drivers may be using memory that has now gone
+ * away. Mark serial as unavailable - this will fall back to the debug
+ * UART if available.
+ *
+ * Do the same with log drivers since the memory may not be available.
+ */
+ gd->flags &= ~(GD_FLG_SERIAL_READY | GD_FLG_LOG_READY);
+
+ /*
* Set up the new global data pointer. So far only x86 does this
* here.
* TODO(sjg@chromium.org): Consider doing this for all archs, or