mmc: dw_mmc: Add RCRC handling
authorMarek Vasut <marex@denx.de>
Tue, 6 Nov 2018 22:42:11 +0000 (23:42 +0100)
committerTom Rini <trini@konsulko.com>
Sat, 10 Nov 2018 13:16:30 +0000 (08:16 -0500)
commit26cc40d8c4aaa8bd69055fb00d0737332661a879
tree4852eb0280919a3cc29415cf8cd4a0c51e4c96a1
parentfb3148a2302b18860a5141d2d8d500ff7d58c0b8
mmc: dw_mmc: Add RCRC handling

This patch adds check for command response CRC failure. The driver
is currently ignoring CRC check failure on command resposes which
have CRC atteched to it, which can be potentially dangerous. Even
more grueling problem happens when the command response is followed
by data transfer though, as in that case, the dwmci_data_transfer()
function will spin until it reaches the 240s timeout.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Heiko Stuebner <heiko@sntech.de>
Cc: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
drivers/mmc/dw_mmc.c
include/dwmmc.h