]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - drivers/mmc/mmc.c
mmc: Add debug() output on read errors
[karo-tx-uboot.git] / drivers / mmc / mmc.c
index 25580d9853088ba9d4f4d4627ffc9546dfca185b..76095f1aa3fce297242e88020328b4b407eb8971 100644 (file)
@@ -251,14 +251,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;