public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Jeroen Hofstee <dasuboot@myspectrum.nl>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 1/1] lib, panic: don't call do_reset in SPL (debug).
Date: Tue, 14 Aug 2012 22:40:50 +0200	[thread overview]
Message-ID: <502AB7D2.80503@myspectrum.nl> (raw)
In-Reply-To: <502AB715.2040403@myspectrum.nl>

Several omap boards won't build when DEBUG is defined, SPL build error:
"vsprintf.c:791: undefined reference to `do_reset'", since SPL has no
commands. Therefore don't call do_reset in SPL. SPL panic will end in an
endless loop or call hang if CONFIG_PANIC_HANG is defined.

cc: Tom Rini <trini@ti.com>
Signed-off-by: Jeroen Hofstee <jhofstee@victronenergy.com>
---
  lib/vsprintf.c |    4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/vsprintf.c b/lib/vsprintf.c
index e38a4b7..4fa392d 100644
--- a/lib/vsprintf.c
+++ b/lib/vsprintf.c
@@ -18,7 +18,7 @@
  #include <errno.h>

  #include <common.h>
-#if !defined (CONFIG_PANIC_HANG)
+#if !defined(CONFIG_PANIC_HANG) && !defined(CONFIG_SPL_BUILD)
  #include <command.h>
  #endif

@@ -786,7 +786,7 @@ void panic(const char *fmt, ...)
      va_end(args);
  #if defined (CONFIG_PANIC_HANG)
      hang();
-#else
+#elif !defined(CONFIG_SPL_BUILD)
      udelay (100000);    /* allow messages to go out */
      do_reset (NULL, 0, 0, NULL);
  #endif
-- 
1.7.9.5

  reply	other threads:[~2012-08-14 20:40 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-14 20:37 [U-Boot] [PATCH 0/1] fix some SPL debug builds Jeroen Hofstee
2012-08-14 20:40 ` Jeroen Hofstee [this message]
2012-08-15 17:11   ` [U-Boot] [PATCH 1/1] lib, panic: don't call do_reset in SPL (debug) Tom Rini
2012-08-17 10:51     ` Stefano Babic
2012-08-24 19:30   ` Tom Rini
2012-09-02 17:03     ` Wolfgang Denk

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=502AB7D2.80503@myspectrum.nl \
    --to=dasuboot@myspectrum.nl \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox