ARM: exynos: Fix build error if SERIAL is disabled in SPL
PATCH 1/2 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.
--- arch/arm/mach-exynos/lowlevel_init.c | 3 +++ 1 file changed, 3 insertions(+)
arch/arm/mach-exynos/lowlevel_init.c +3 -0
@@ -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 (); }
Signature · 1 line
2.7.0
PATCH 2/2 ARM: exynos: Disable serial support in SPL
The exynos5 platforms use DM in U-Boot and do not use DM in SPL. The serial driver, serial_s5p.c, is DM-only. This is OK for U-Boot, but in SPL, this will fail with the following compile error:
drivers/built-in.o: In function `get_current':...u-boot/drivers/serial/serial.c:387: undefined reference to `default_serial_console'
This warning happens because common/console.c is compiled into U-Boot SPL if CONFIG_SPL_SERIAL_SUPPORT . The common/console.c invokes serial_*() functions and since exynos5 does not use DM in SPL, these functions come from drivers/serial/serial.c . The serial_*() locate default serial port by calling default_serial_console(), but because the serial_s5p.c is DM-only, it does no longer define default_serial_console(). Thus the error.
--- include/configs/exynos5-common.h | 1 - 1 file changed, 1 deletion(-)
include/configs/exynos5-common.h +0 -1
@@ -60,7 +60,6 @@#define CONFIG_SPL_LIBCOMMON_SUPPORT #define CONFIG_SPL_GPIO_SUPPORT -#define CONFIG_SPL_SERIAL_SUPPORT #define CONFIG_SPL_LIBGENERIC_SUPPORT /* specific .lds file */
Signature · 1 line
2.7.0
PATCH 2/2 ARM: exynos: Disable serial support in SPL
Quoted 14 lines · Marek Vasut
The exynos5 platforms use DM in U-Boot and do not use DM in SPL. The serial driver,
serial_s5p.c, is DM-only. This is OK for U-Boot, but in SPL, this will fail with the following compile error:
drivers/built-in.o: In function `get_current':...u-boot/drivers/serial/serial.c:387: undefined reference to `default_serial_console'This warning happens because
common/console.cis compiled into U-Boot SPL ifCONFIG_SPL_SERIAL_SUPPORT. Thecommon/console.cinvokes serial_*() functions and since exynos5 does not use DM in SPL, these functions come fromdrivers/serial/serial.c. The serial_*() locate default serial port by callingdefault_serial_console(), but because theserial_s5p.cis DM-only, it does no longer definedefault_serial_console(). Thus the error.
Quoted 6 lines
Signed-off-by Marek Vasut <[email protected]>Cc Simon Glass <[email protected]>Cc Tom Rini <[email protected]>--- include/configs/exynos5-common.h | 1 - 1 file changed, 1 deletion(-)
PATCH 2/2 ARM: exynos: Disable serial support in SPL
In reply to Marek VasutQuoted 7 lines · Marek Vasut
The exynos5 platforms use DM in U-Boot and do not use DM in SPL. The serial driver,
serial_s5p.c, is DM-only. This is OK for U-Boot, but in SPL, this will fail with the following compile error:
drivers/built-in.o: In function `get_current':...u-boot/drivers/serial/serial.c:387: undefined reference to `default_serial_console'
Quoted 6 lines
This warning happens because
common/console.cis compiled into U-Boot SPL ifCONFIG_SPL_SERIAL_SUPPORT. Thecommon/console.cinvokes serial_*() functions and since exynos5 does not use DM in SPL, these functions come fromdrivers/serial/serial.c. The serial_*() locate default serial port by callingdefault_serial_console(), but because theserial_s5p.cis DM-only, it does no longer definedefault_serial_console(). Thus the error.
This is OK short term, can you see if turning on DM in SPL is easy for these platforms instead? Thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160501/bf740ac0/attachment.sig>
PATCH 2/2 ARM: exynos: Disable serial support in SPL
Quoted 9 lines · Tom Rini
Quoted 7 lines · Marek Vasut
The exynos5 platforms use DM in U-Boot and do not use DM in SPL. The serial driver,
serial_s5p.c, is DM-only. This is OK for U-Boot, but in SPL, this will fail with the following compile error:
drivers/built-in.o: In function `get_current':...u-boot/drivers/serial/serial.c:387: undefined reference to `default_serial_console'
Quoted 8 lines
Quoted 6 lines
This warning happens because
common/console.cis compiled into U-Boot SPL ifCONFIG_SPL_SERIAL_SUPPORT. Thecommon/console.cinvokes serial_*() functions and since exynos5 does not use DM in SPL, these functions come fromdrivers/serial/serial.c. The serial_*() locate default serial port by callingdefault_serial_console(), but because theserial_s5p.cis DM-only, it does no longer definedefault_serial_console(). Thus the error.This is OK short term
Yes, indeed.
Quoted 3 lines
can you see if turning on DM in SPL is easy for
these platforms instead? Thanks!
I hope Simon can take a look into that ;-)
Signature · 2 lines
Best regards, Marek Vasut
PATCH 2/2 ARM: exynos: Disable serial support in SPL
Quoted 17 lines · Marek Vasut
Quoted 16 lines · Tom Rini
Quoted 13 lines · Marek Vasut
The exynos5 platforms use DM in U-Boot and do not use DM in SPL. The serial driver,
serial_s5p.c, is DM-only. This is OK for U-Boot, but in SPL, this will fail with the following compile error:
drivers/built-in.o: In function `get_current':...u-boot/drivers/serial/serial.c:387: undefined reference to `default_serial_console'This warning happens because
common/console.cis compiled into U-Boot SPL ifCONFIG_SPL_SERIAL_SUPPORT. Thecommon/console.cinvokes serial_*() functions and since exynos5 does not use DM in SPL, these functions come fromdrivers/serial/serial.c. The serial_*() locate default serial port by callingdefault_serial_console(), but because theserial_s5p.cis DM-only, it does no longer definedefault_serial_console(). Thus the error.
Quoted 9 lines
Quoted 1 line
This is OK short term
Yes, indeed.
Quoted 3 lines
can you see if turning on DM in SPL is easy for
these platforms instead? Thanks!I hope Simon can take a look into that ;-)
applied to u-boot-samsung.
Thanks,
Minkyu Kang.
PATCH 1/2 ARM: exynos: Fix build error if SERIAL is disabled in SPL
In reply to Marek Vasut+Minkyu
Quoted 10 lines · Marek Vasut
If
CONFIG_SPL_SERIAL_SUPPORTis not defined ininclude/configs/exynos5-common.hthe 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_SUPPORTis also set before enabling the debug UART.
Quoted 6 lines
Signed-off-by Marek Vasut <[email protected]>Cc Simon Glass <[email protected]>Cc Tom Rini <[email protected]>--- arch/arm/mach-exynos/lowlevel_init.c | 3 +++ 1 file changed, 3 insertions(+)
PATCH 1/2 ARM: exynos: Fix build error if SERIAL is disabled in SPL
Quoted 13 lines · Simon Glass
+Minkyu
Quoted 10 lines · Marek Vasut
If
CONFIG_SPL_SERIAL_SUPPORTis not defined ininclude/configs/exynos5-common.hthe 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_SUPPORTis also set before enabling the debug UART.
Quoted 10 lines
Quoted 6 lines
Signed-off-by Marek Vasut <[email protected]>Cc Simon Glass <[email protected]>Cc Tom Rini <[email protected]>--- arch/arm/mach-exynos/lowlevel_init.c | 3 +++ 1 file changed, 3 insertions(+)Reviewed-by Simon Glass <[email protected]>
applied to u-boot-samsung.
Thanks,
Minkyu Kang.