From: Simon Glass Date: Sun, 17 May 2020 21:00:59 -0600 Subject: [PATCH 3/3] x86: spl: Print the error on SPL failure In-Reply-To: <20200518030059.80935-1-sjg@chromium.org> References: <20200518030059.80935-1-sjg@chromium.org> Message-ID: <20200518030059.80935-4-sjg@chromium.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de The error code is often useful to figure out what is going on. Printing it does not increase code size much, so print out the error and then hang. Signed-off-by: Simon Glass --- arch/x86/lib/spl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/x86/lib/spl.c b/arch/x86/lib/spl.c index 212b4d596d..a533dfa8b3 100644 --- a/arch/x86/lib/spl.c +++ b/arch/x86/lib/spl.c @@ -161,8 +161,8 @@ void board_init_f(ulong flags) ret = x86_spl_init(); if (ret) { - debug("Error %d\n", ret); - panic("x86_spl_init fail"); + printf("x86_spl_init: error %d\n", ret); + hang(); } #if IS_ENABLED(CONFIG_TPL) || IS_ENABLED(CONFIG_SYS_COREBOOT) gd->bd = malloc(sizeof(*gd->bd)); -- 2.26.2.761.g0e0b3e54be-goog