aboutsummaryrefslogtreecommitdiff
path: root/arch/x86
diff options
context:
space:
mode:
authorSimon Glass2023-07-15 21:39:00 -0600
committerBin Meng2023-07-17 17:12:26 +0800
commit352525801992799b9bb289e3233a8b17bcf2bc52 (patch)
tree3a8d1a802177eec0e4c301e1a8691625ab299369 /arch/x86
parent03fe79c091cee0bd591070dd24adfa8f556b50df (diff)
x86: Ensure SPL banner is only shown once
Print the banner in SPL init only if the spl_board_init() function isn't enabled. The spl_board_init() function is in the same file, but is called later, by board_init_r(). This avoids printing two banners, which causes tests to fail. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Diffstat (limited to 'arch/x86')
-rw-r--r--arch/x86/lib/spl.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/arch/x86/lib/spl.c b/arch/x86/lib/spl.c
index b9d23e6bfe1..f27501875ec 100644
--- a/arch/x86/lib/spl.c
+++ b/arch/x86/lib/spl.c
@@ -97,7 +97,13 @@ static int x86_spl_init(void)
return ret;
}
#endif
- preloader_console_init();
+ /*
+ * spl_board_init() below sets up the console if enabled. If it isn't,
+ * do it here. We cannot call this twice since it results in a double
+ * banner and CI tests fail.
+ */
+ if (!IS_ENABLED(CONFIG_SPL_BOARD_INIT))
+ preloader_console_init();
#if !defined(CONFIG_TPL) && !CONFIG_IS_ENABLED(CPU)
ret = print_cpuinfo();
if (ret) {