mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-11 15:37:23 +00:00
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>
This commit is contained in:
parent
8e2b0af721
commit
01962f8d7c
1 changed files with 4 additions and 2 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue