aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBin Meng <bmeng.cn@gmail.com>2021-02-02 10:32:48 +0800
committerPeng Fan <peng.fan@nxp.com>2021-02-19 15:06:53 +0800
commit01962f8d7ced3d8b9748d3b902f7f9b68587c426 (patch)
tree904d96efe309ec60889488f031f6f4eb660b55e0
parent8e2b0af7216d78b60fccb46a107a4a047938aea9 (diff)
downloadu-boot-01962f8d7ced3d8b9748d3b902f7f9b68587c426.zip
u-boot-01962f8d7ced3d8b9748d3b902f7f9b68587c426.tar.gz
u-boot-01962f8d7ced3d8b9748d3b902f7f9b68587c426.tar.bz2
mmc: mmc_spi: Print verbose debug output when crc16 check fails
Add some verbose debug output when crc16 check fails. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
-rw-r--r--drivers/mmc/mmc_spi.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/mmc/mmc_spi.c b/drivers/mmc/mmc_spi.c
index 46800bb..23b9073 100644
--- a/drivers/mmc/mmc_spi.c
+++ b/drivers/mmc/mmc_spi.c
@@ -181,8 +181,10 @@ static int mmc_spi_readdata(struct udevice *dev,
if (ret)
return ret;
#ifdef CONFIG_MMC_SPI_CRC_ON
- if (be16_to_cpu(crc16_ccitt(0, buf, bsize)) != crc) {
- debug("%s: data crc error\n", __func__);
+ u16 crc_ok = be16_to_cpu(crc16_ccitt(0, buf, bsize));
+ if (crc_ok != crc) {
+ debug("%s: data crc error, expected %04x got %04x\n",
+ __func__, crc_ok, crc);
r1 = R1_SPI_COM_CRC;
break;
}