summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2015-06-23 15:38:47 -0600
committerSimon Glass <sjg@chromium.org>2015-07-21 17:39:24 -0600
commitfdfa39d3f20b669b0cdb8f5e934003e5689fd911 (patch)
treed65b7fd31b6ec9e0454686e5c0b3b2895f213931 /common
parent5ac76bad2277ed40f2a2112ffab0f156e3b599fb (diff)
downloadu-boot-imx-fdfa39d3f20b669b0cdb8f5e934003e5689fd911.zip
u-boot-imx-fdfa39d3f20b669b0cdb8f5e934003e5689fd911.tar.gz
u-boot-imx-fdfa39d3f20b669b0cdb8f5e934003e5689fd911.tar.bz2
spl: Add debugging info for spl_mmc boot
Add a few messages to indicate progress and failure. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'common')
-rw-r--r--common/spl/spl_mmc.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/common/spl/spl_mmc.c b/common/spl/spl_mmc.c
index 552f80d..51add39 100644
--- a/common/spl/spl_mmc.c
+++ b/common/spl/spl_mmc.c
@@ -26,11 +26,14 @@ static int mmc_load_image_raw_sector(struct mmc *mmc, unsigned long sector)
/* read image header to find the image size & load address */
count = mmc->block_dev.block_read(0, sector, 1, header);
+ debug("read sector %lx, count=%lu\n", sector, count);
if (count == 0)
goto end;
- if (image_get_magic(header) != IH_MAGIC)
+ if (image_get_magic(header) != IH_MAGIC) {
+ puts("bad magic\n");
return -1;
+ }
spl_parse_image_header(header);
@@ -40,7 +43,9 @@ static int mmc_load_image_raw_sector(struct mmc *mmc, unsigned long sector)
/* Read the header too to avoid extra memcpy */
count = mmc->block_dev.block_read(0, sector, image_size_sectors,
- (void *) spl_image.load_addr);
+ (void *)spl_image.load_addr);
+ debug("read %x sectors to %x\n", image_size_sectors,
+ spl_image.load_addr);
end:
if (count == 0) {