From: Rick Chen Date: Fri, 25 Aug 2017 06:02:13 +0000 (+0800) Subject: nds32: ftsdc010: fix wait status error coding. X-Git-Url: http://git.dujemihanovic.xyz/?a=commitdiff_plain;h=1a9db640b4f5f8070d75a5baf794678625b4f9a0;p=u-boot.git nds32: ftsdc010: fix wait status error coding. Bit of DATA_END and DATA_CRC_OK shall be checked for returning pass or fail of a request. Signed-off-by: Rick Chen --- diff --git a/drivers/mmc/ftsdc010_mci.c b/drivers/mmc/ftsdc010_mci.c index e044d8516a..113cf13909 100644 --- a/drivers/mmc/ftsdc010_mci.c +++ b/drivers/mmc/ftsdc010_mci.c @@ -128,8 +128,9 @@ static int ftsdc010_wait(struct ftsdc010_mmc __iomem *regs, uint32_t mask) break; } - if (ret) + if (ret){ debug("ftsdc010: wait st(0x%x) timeout\n", mask); + } return ret; } @@ -241,7 +242,7 @@ static int ftsdc010_request(struct mmc *mmc, struct mmc_cmd *cmd, if (!ret) { ret = ftsdc010_wait(regs, - FTSDC010_STATUS_DATA_END | FTSDC010_STATUS_DATA_ERROR); + FTSDC010_STATUS_DATA_END | FTSDC010_STATUS_DATA_CRC_OK); } return ret;