Message ID | 20200527065838.v2.3.I69f4fdf91be179c655b605f9d51250a4041f336f@changeid |
---|---|
State | Accepted |
Commit | d7413deaddfc247a0d911fcfdcccba412e3661ed |
Headers | show |
Series | x86: Correct SPI memory-mapping query | expand |
On Wed, May 27, 2020 at 8:58 PM Simon Glass <sjg at chromium.org> wrote: > > 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 <sjg at chromium.org> > --- > > Changes in v2: None > > arch/x86/lib/spl.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > Reviewed-by: Bin Meng <bmeng.cn at gmail.com>
On Thu, May 28, 2020 at 3:36 PM Bin Meng <bmeng.cn at gmail.com> wrote: > > On Wed, May 27, 2020 at 8:58 PM Simon Glass <sjg at chromium.org> wrote: > > > > 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 <sjg at chromium.org> > > --- > > > > Changes in v2: None > > > > arch/x86/lib/spl.c | 4 ++-- > > 1 file changed, 2 insertions(+), 2 deletions(-) > > > > Reviewed-by: Bin Meng <bmeng.cn at gmail.com> applied to u-boot-x86, thanks!
diff --git a/arch/x86/lib/spl.c b/arch/x86/lib/spl.c index b6f9a70ba7..cf22fa2d7b 100644 --- a/arch/x86/lib/spl.c +++ b/arch/x86/lib/spl.c @@ -164,8 +164,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));
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 <sjg at chromium.org> --- Changes in v2: None arch/x86/lib/spl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)