From 4fec2aaa3365005f84ca0001661487aa235ebc93 Mon Sep 17 00:00:00 2001 From: Troy Kisky <troy.kisky@boundarydevices.com> Date: Sun, 4 Dec 2016 20:03:28 -0700 Subject: [PATCH] mmc: add more prints if CONFIG_MMC_TRACE Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com> --- drivers/mmc/mmc.c | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c index f7827f527aa..985d6a34590 100644 --- a/drivers/mmc/mmc.c +++ b/drivers/mmc/mmc.c @@ -388,7 +388,27 @@ static int mmc_read_blocks(struct mmc *mmc, void *dst, lbaint_t start, return 0; } } - +#ifdef CONFIG_MMC_TRACE + { + int cnt = blkcnt; + unsigned *p = dst; + + while (cnt--) { + int rem = mmc->read_bl_len; + int offset = 0; + + printf("Block 0x%lx\n", start++); + while (rem > 0) { + printf("%03x: %08x %08x %08x %08x %08x %08x %08x %08x\n", + offset, p[0], p[1], p[2], p[3], + p[4], p[5], p[6], p[7]); + rem -= 32; + offset += 32; + p += 8; + } + } + } +#endif return blkcnt; } -- GitLab