From: Mario Kicherer <dev@kicherer.org>
To: u-boot@lists.denx.de
Cc: Mario Kicherer <dev@kicherer.org>
Subject: [PATCH] spl: spl_nor: use panic instead of hang if booting fails
Date: Mon, 30 Jan 2023 11:03:03 +0100 [thread overview]
Message-ID: <20230130100303.258229-1-dev@kicherer.org> (raw)
On systems without a watchdog, using hang() prevents a system to
recover from an error. For example, a board could implement a boot
counter to switch to an alternative load address after some failed
tries.
Signed-off-by: Mario Kicherer <dev@kicherer.org>
---
common/spl/spl.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/common/spl/spl.c b/common/spl/spl.c
index 2855cdd117..d1aa2fb8a9 100644
--- a/common/spl/spl.c
+++ b/common/spl/spl.c
@@ -822,11 +822,10 @@ void board_init_r(gd_t *dummy1, ulong dummy2)
if (ret) {
if (CONFIG_IS_ENABLED(SHOW_ERRORS) &&
CONFIG_IS_ENABLED(LIBCOMMON_SUPPORT))
- printf(SPL_TPL_PROMPT "failed to boot from all boot devices (err=%d)\n",
- ret);
+ panic(SPL_TPL_PROMPT "failed to boot from all boot devices (err=%d)\n",
+ ret);
else
- puts(SPL_TPL_PROMPT "failed to boot from all boot devices\n");
- hang();
+ panic_str(SPL_TPL_PROMPT "failed to boot from all boot devices\n");
}
spl_perform_fixups(&spl_image);
--
2.34.1
next reply other threads:[~2023-01-30 10:03 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-30 10:03 Mario Kicherer [this message]
2023-06-20 15:17 ` [PATCH] spl: spl_nor: use panic instead of hang if booting fails Tom Rini
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=20230130100303.258229-1-dev@kicherer.org \
--to=dev@kicherer.org \
--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