diff options
author | Simon Glass <sjg@chromium.org> | 2015-06-23 15:38:50 -0600 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2015-07-21 17:39:25 -0600 |
commit | 1169299135d7793dcea5f05a959a9c38d78a0ee1 (patch) | |
tree | 35f73e62fea1582f503a84898a94c34d3608f114 /drivers | |
parent | e7ecf7cb5a6b873daf2d88daf03034d51fad4acc (diff) | |
download | u-boot-imx-1169299135d7793dcea5f05a959a9c38d78a0ee1.zip u-boot-imx-1169299135d7793dcea5f05a959a9c38d78a0ee1.tar.gz u-boot-imx-1169299135d7793dcea5f05a959a9c38d78a0ee1.tar.bz2 |
mmc: Add debug() output on read errors
Allow read errors to be diagnosed more easily.
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/mmc/mmc.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c index 4eab274..da47037 100644 --- a/drivers/mmc/mmc.c +++ b/drivers/mmc/mmc.c @@ -250,14 +250,18 @@ static ulong mmc_bread(int dev_num, lbaint_t start, lbaint_t blkcnt, void *dst) return 0; } - if (mmc_set_blocklen(mmc, mmc->read_bl_len)) + if (mmc_set_blocklen(mmc, mmc->read_bl_len)) { + debug("%s: Failed to set blocklen\n", __func__); return 0; + } do { cur = (blocks_todo > mmc->cfg->b_max) ? mmc->cfg->b_max : blocks_todo; - if(mmc_read_blocks(mmc, dst, start, cur) != cur) + if (mmc_read_blocks(mmc, dst, start, cur) != cur) { + debug("%s: Failed to read blocks\n", __func__); return 0; + } blocks_todo -= cur; start += cur; dst += cur * mmc->read_bl_len; |