From 3988be5fd4369402c410336553bc0ca1920dbe6f Mon Sep 17 00:00:00 2001 From: Samuel Holland Date: Thu, 7 May 2020 18:08:10 -0500 Subject: spl: Always define preloader_console_init A large number of boards call preloader_console_init unconditionally. Currently, they fail to build with CONFIG_SPL_SERIAL=n, because the function is undefined in that case. To fix the build, always define preloader_console_init, but make it no-op when CONFIG_SPL_SERIAL=n. For the few boards that did check for CONFIG_SPL_SERIAL before calling preloader_console_init, remove the checks, since the function can now be called unconditionally. Signed-off-by: Samuel Holland Reviewed-by: Stefan Roese Reviewed-by: Lokesh Vutla --- arch/arm/mach-omap2/boot-common.c | 3 +-- arch/arm/mach-uniphier/spl_board_init.c | 2 -- 2 files changed, 1 insertion(+), 4 deletions(-) (limited to 'arch/arm') diff --git a/arch/arm/mach-omap2/boot-common.c b/arch/arm/mach-omap2/boot-common.c index 7538523..d57382a 100644 --- a/arch/arm/mach-omap2/boot-common.c +++ b/arch/arm/mach-omap2/boot-common.c @@ -194,10 +194,9 @@ u32 spl_mmc_boot_mode(const u32 boot_device) void spl_board_init(void) { -#ifdef CONFIG_SPL_SERIAL_SUPPORT /* Prepare console output */ preloader_console_init(); -#endif + #if defined(CONFIG_SPL_NAND_SUPPORT) || defined(CONFIG_SPL_ONENAND_SUPPORT) gpmc_init(); #endif diff --git a/arch/arm/mach-uniphier/spl_board_init.c b/arch/arm/mach-uniphier/spl_board_init.c index c7262d7..48764a1 100644 --- a/arch/arm/mach-uniphier/spl_board_init.c +++ b/arch/arm/mach-uniphier/spl_board_init.c @@ -112,9 +112,7 @@ void spl_board_init(void) initdata->early_clk_init(); -#ifdef CONFIG_SPL_SERIAL_SUPPORT preloader_console_init(); -#endif ret = initdata->dpll_init(bd); if (ret) { -- cgit v1.1