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>
This commit is contained in:
Rick Chen 2017-08-25 14:02:13 +08:00 committed by Rick Chen
parent c39b79df43
commit 1a9db640b4

View File

@ -128,8 +128,9 @@ static int ftsdc010_wait(struct ftsdc010_mmc __iomem *regs, uint32_t mask)
break; break;
} }
if (ret) if (ret){
debug("ftsdc010: wait st(0x%x) timeout\n", mask); debug("ftsdc010: wait st(0x%x) timeout\n", mask);
}
return ret; return ret;
} }
@ -241,7 +242,7 @@ static int ftsdc010_request(struct mmc *mmc, struct mmc_cmd *cmd,
if (!ret) { if (!ret) {
ret = ftsdc010_wait(regs, ret = ftsdc010_wait(regs,
FTSDC010_STATUS_DATA_END | FTSDC010_STATUS_DATA_ERROR); FTSDC010_STATUS_DATA_END | FTSDC010_STATUS_DATA_CRC_OK);
} }
return ret; return ret;