rockchip: Fix SPL console output when ROCKCHIP_SPL_BACK_TO_BROM is enabled

Move back_to_bootrom() call later in SPL init so that the console is
initialized and printouts happen.

Currently when ROCKCHIP_SPL_BACK_TO_BROM is enabled there is no console
output from the SPL init stages.

I wasn't sure exactly where this should happen, so if we are set to do
run spl_board_init, then go back to bootrom there after
preloader_console_init(). Otherwise fall back to old behavior of doing
it in board_init_f.

Signed-off-by: Sandy Patterson <apatterson@sightlogix.com>
Acked-by: Ziyuan Xu <xzy.xu@rock-chips.com>
Acked-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
Sandy Patterson 2016-08-10 10:21:47 -04:00 committed by Simon Glass
parent 2179a07c0c
commit 427351dc1d

View File

@ -206,7 +206,7 @@ void board_init_f(ulong dummy)
debug("DRAM init failed: %d\n", ret); debug("DRAM init failed: %d\n", ret);
return; return;
} }
#ifdef CONFIG_ROCKCHIP_SPL_BACK_TO_BROM #if defined(CONFIG_ROCKCHIP_SPL_BACK_TO_BROM) && !defined(CONFIG_SPL_BOARD_INIT)
back_to_bootrom(); back_to_bootrom();
#endif #endif
} }
@ -273,6 +273,9 @@ void spl_board_init(void)
} }
preloader_console_init(); preloader_console_init();
#ifdef CONFIG_ROCKCHIP_SPL_BACK_TO_BROM
back_to_bootrom();
#endif
return; return;
err: err:
printf("spl_board_init: Error %d\n", ret); printf("spl_board_init: Error %d\n", ret);