All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alex Kiernan <alex.kiernan@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v1 4/8] spl: ti: Avoid serial calls when serial support is disabled
Date: Wed, 18 Apr 2018 09:02:19 +0000	[thread overview]
Message-ID: <1524042143-30213-5-git-send-email-alex.kiernan@gmail.com> (raw)
In-Reply-To: <1524042143-30213-1-git-send-email-alex.kiernan@gmail.com>

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 --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();
-- 
2.7.4

  parent reply	other threads:[~2018-04-18  9:02 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-18  9:02 [U-Boot] [PATCH v1 0/8] Fix SPL build without CONFIG_SPL_SERIAL_SUPPORT Alex Kiernan
2018-04-18  9:02 ` [U-Boot] [PATCH v1 1/8] Cleanup CONFIG_SPL_SERIAL_SUPPORT migration Alex Kiernan
2018-04-18  9:02 ` [U-Boot] [PATCH v1 2/8] spl: ti: Avoid preloader_console_init if !CONFIG_SPL_SERIAL_SUPPORT Alex Kiernan
2018-04-18  9:02 ` [U-Boot] [PATCH v1 3/8] spl: Add dependency on serial to Ymodem Alex Kiernan
2018-04-18  9:02 ` Alex Kiernan [this message]
2018-04-18  9:02 ` [U-Boot] [PATCH v1 5/8] spl: Split sprintf, strto* from SPL serial in Kconfig Alex Kiernan
2018-04-18  9:02 ` [U-Boot] [PATCH v1 6/8] spl: Disable printf if not required Alex Kiernan
2018-04-18  9:27   ` Jean-Jacques Hiblot
2018-04-18 10:29     ` Alex Kiernan
2018-04-18  9:02 ` [U-Boot] [PATCH v1 7/8] Consolidate __assert_failed into one implementation Alex Kiernan
2018-04-18  9:02 ` [U-Boot] [PATCH v1 8/8] spl: disk: usb: Add dependencies to sprintf/strto* Alex Kiernan
2018-04-18  9:11   ` Maxime Ripard
2018-04-18 10:27     ` Alex Kiernan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1524042143-30213-5-git-send-email-alex.kiernan@gmail.com \
    --to=alex.kiernan@gmail.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.