diff mbox

[U-Boot,1/2] ARM: exynos: Fix build error if SERIAL is disabled in SPL

Message ID 1462055772-6419-1-git-send-email-marex@denx.de
State Accepted
Commit c06bbab65b79c2a1c077d78269ed2bfa87f6e923
Delegated to: Minkyu Kang
Headers show

Commit Message

Marek Vasut April 30, 2016, 10:36 p.m. UTC
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 <marex@denx.de>
Cc: Simon Glass <sjg@chromium.org>
Cc: Tom Rini <trini@konsulko.com>
---
 arch/arm/mach-exynos/lowlevel_init.c | 3 +++
 1 file changed, 3 insertions(+)

Comments

Simon Glass May 1, 2016, 6:55 p.m. UTC | #1
+Minkyu

On 30 April 2016 at 16:36, Marek Vasut <marex@denx.de> wrote:
> 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 <marex@denx.de>
> Cc: Simon Glass <sjg@chromium.org>
> Cc: Tom Rini <trini@konsulko.com>
> ---
>  arch/arm/mach-exynos/lowlevel_init.c | 3 +++
>  1 file changed, 3 insertions(+)

Reviewed-by: Simon Glass <sjg@chromium.org>
Minkyu Kang May 26, 2016, 5:01 a.m. UTC | #2
On 02/05/16 03:55, Simon Glass wrote:
> +Minkyu
> 
> On 30 April 2016 at 16:36, Marek Vasut <marex@denx.de> wrote:
>> 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 <marex@denx.de>
>> Cc: Simon Glass <sjg@chromium.org>
>> Cc: Tom Rini <trini@konsulko.com>
>> ---
>>  arch/arm/mach-exynos/lowlevel_init.c | 3 +++
>>  1 file changed, 3 insertions(+)
> 
> Reviewed-by: Simon Glass <sjg@chromium.org>
> 
> 

applied to u-boot-samsung.

Thanks,
Minkyu Kang.
diff mbox

Patch

diff --git a/arch/arm/mach-exynos/lowlevel_init.c b/arch/arm/mach-exynos/lowlevel_init.c
index 6c39cb2..1e090fd 100644
--- a/arch/arm/mach-exynos/lowlevel_init.c
+++ b/arch/arm/mach-exynos/lowlevel_init.c
@@ -216,9 +216,12 @@  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();
 	}