From: Marek Vasut Date: Sat, 30 Apr 2016 22:36:11 +0000 (+0200) Subject: ARM: exynos: Fix build error if SERIAL is disabled in SPL X-Git-Tag: v2016.07-rc1~1^2~1 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=c06bbab65b79c2a1c077d78269ed2bfa87f6e923;p=u-boot ARM: exynos: Fix build error if SERIAL is disabled in SPL If CONFIG_SPL_SERIAL_SUPPORT is not defined in include/configs/exynos5-common.h the following error is produced during the build of the SPL: arch/arm/mach-exynos/built-in.o: In function `do_lowlevel_init': ...u-boot/arch/arm/mach-exynos/lowlevel_init.c:221: undefined reference to `debug_uart_init' Add additional condition to check if SPL build is in progress and in that case check if CONFIG_SPL_SERIAL_SUPPORT is also set before enabling the debug UART. Signed-off-by: Marek Vasut Cc: Simon Glass Cc: Tom Rini Reviewed-by: Simon Glass Signed-off-by: Minkyu Kang --- diff --git a/arch/arm/mach-exynos/lowlevel_init.c b/arch/arm/mach-exynos/lowlevel_init.c index 6c39cb2052..1e090fd63c 100644 --- a/arch/arm/mach-exynos/lowlevel_init.c +++ b/arch/arm/mach-exynos/lowlevel_init.c @@ -216,8 +216,11 @@ int do_lowlevel_init(void) if (actions & DO_CLOCKS) { system_clock_init(); #ifdef CONFIG_DEBUG_UART +#if (defined(CONFIG_SPL_BUILD) && defined(CONFIG_SPL_SERIAL_SUPPORT)) || \ + !defined(CONFIG_SPL_BUILD) exynos_pinmux_config(PERIPH_ID_UART3, PINMUX_FLAG_NONE); debug_uart_init(); +#endif #endif mem_ctrl_init(actions & DO_MEM_RESET); tzpc_init();