From: Chris Webb Date: Fri, 19 Jul 2019 13:23:11 +0000 (+0100) Subject: rockchip: Fix TPL build without CONFIG_TPL_SERIAL_SUPPORT X-Git-Url: http://git.dujemihanovic.xyz/?a=commitdiff_plain;h=58fcb03e671fbe847a0007171d4d54dad5af8139;p=u-boot.git rockchip: Fix TPL build without CONFIG_TPL_SERIAL_SUPPORT If CONFIG_DEBUG_UART is set but CONFIG_TPL_SERIAL_SUPPORT is not, the serial output should be available in SPL and full U-Boot, but not built in TPL. However, the rockchip tpl.c instead fails to compile with undefined references to the debug UART. Instead, initialise the debug UART and print the TPL banner only if both CONFIG_DEBUG_UART and CONFIG_TPL_SERIAL_SUPPORT are set. Signed-off-by: Reviewed-by: Kever Yang --- diff --git a/arch/arm/mach-rockchip/tpl.c b/arch/arm/mach-rockchip/tpl.c index 0ff2a197ed..5df88bddeb 100644 --- a/arch/arm/mach-rockchip/tpl.c +++ b/arch/arm/mach-rockchip/tpl.c @@ -44,7 +44,7 @@ void board_init_f(ulong dummy) struct udevice *dev; int ret; -#ifdef CONFIG_DEBUG_UART +#if defined(CONFIG_DEBUG_UART) && defined(CONFIG_TPL_SERIAL_SUPPORT) /* * Debug UART can be used from here if required: *