spl: spi: Add a debug message if loading fails
This currently fails silently. Add a debug message to aid debugging. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
This commit is contained in:
parent
b026542946
commit
a704490034
|
@ -96,8 +96,11 @@ static int spl_spi_load_image(struct spl_image_info *spl_image,
|
||||||
/* Load u-boot, mkimage header is 64 bytes. */
|
/* Load u-boot, mkimage header is 64 bytes. */
|
||||||
err = spi_flash_read(flash, CONFIG_SYS_SPI_U_BOOT_OFFS, 0x40,
|
err = spi_flash_read(flash, CONFIG_SYS_SPI_U_BOOT_OFFS, 0x40,
|
||||||
(void *)header);
|
(void *)header);
|
||||||
if (err)
|
if (err) {
|
||||||
|
debug("%s: Failed to read from SPI flash (err=%d)\n",
|
||||||
|
__func__, err);
|
||||||
return err;
|
return err;
|
||||||
|
}
|
||||||
|
|
||||||
if (IS_ENABLED(CONFIG_SPL_LOAD_FIT) &&
|
if (IS_ENABLED(CONFIG_SPL_LOAD_FIT) &&
|
||||||
image_get_magic(header) == FDT_MAGIC) {
|
image_get_magic(header) == FDT_MAGIC) {
|
||||||
|
|
Loading…
Reference in New Issue