diff mbox series

[U-Boot,v1,4/8] spl: ti: Avoid serial calls when serial support is disabled

Message ID 1524042143-30213-5-git-send-email-alex.kiernan@gmail.com
State Superseded
Delegated to: Tom Rini
Headers show
Series Fix SPL build without CONFIG_SPL_SERIAL_SUPPORT | expand

Commit Message

Alex Kiernan April 18, 2018, 9:02 a.m. UTC
If CONFIG_SPL_SERIAL_SUPPORT is not set, then the build will fail:

board/ti/am335x/built-in.o: In function `spl_start_uboot':
board/ti/am335x/board.c:247: undefined reference to `serial_tstc'
board/ti/am335x/board.c:247: undefined reference to `serial_getc'

Avoid the calls to the serial functions in that case.

Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
---

 board/ti/am335x/board.c | 2 ++
 1 file changed, 2 insertions(+)
diff mbox series

Patch

diff --git a/board/ti/am335x/board.c b/board/ti/am335x/board.c
index c33bf58..896b9b6 100644
--- a/board/ti/am335x/board.c
+++ b/board/ti/am335x/board.c
@@ -243,9 +243,11 @@  static struct emif_regs ddr3_icev2_emif_reg_data = {
 #ifdef CONFIG_SPL_OS_BOOT
 int spl_start_uboot(void)
 {
+#ifdef CONFIG_SPL_SERIAL_SUPPORT
 	/* break into full u-boot on 'c' */
 	if (serial_tstc() && serial_getc() == 'c')
 		return 1;
+#endif
 
 #ifdef CONFIG_SPL_ENV_SUPPORT
 	env_init();