]> git.sur5r.net Git - u-boot/commitdiff
nds32: ftsdc010: fix wait status error coding.
authorRick Chen <rick@andestech.com>
Fri, 25 Aug 2017 06:02:13 +0000 (14:02 +0800)
committerRick Chen <rickchen36@gmail.com>
Thu, 30 Nov 2017 02:04:30 +0000 (10:04 +0800)
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>
drivers/mmc/ftsdc010_mci.c

index e044d8516a5aaa4486572bc3f6bb65b734ce7ad1..113cf13909abeda3d2ec193c1b46530c0aecad5e 100644 (file)
@@ -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;