aboutsummaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorRick Chen2017-08-25 14:02:13 +0800
committerRick Chen2017-11-30 10:04:30 +0800
commit1a9db640b4f5f8070d75a5baf794678625b4f9a0 (patch)
tree6230b139be06146106f71abf92005a489232a52f /drivers
parentc39b79df43dcabc19a87bbea7e64a26670c73f44 (diff)
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 <rick@andestech.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/mmc/ftsdc010_mci.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/mmc/ftsdc010_mci.c b/drivers/mmc/ftsdc010_mci.c
index e044d8516a5..113cf13909a 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;