mmc: fsl_esdhc_imx: enlarge mmc timeout
authorPeng Fan <peng.fan@nxp.com>
Wed, 10 Jul 2019 09:35:30 +0000 (09:35 +0000)
committerPeng Fan <peng.fan@nxp.com>
Mon, 15 Jul 2019 02:30:09 +0000 (10:30 +0800)
Flash system partition with fastboot will earse the partition firstly
The 600ms timeout will fail on some SD Card. Enlarge it to 5s to make
it works for most of sdcard

Cc: guoyin.chen <guoyin.chen@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
drivers/mmc/fsl_esdhc_imx.c

index 2152d8aa3ae93c0512686bf026ae6cdbea1cea5b..43106dec7566d35b90d1ffcf8ab7b8e491590a24 100644 (file)
@@ -513,9 +513,9 @@ static int esdhc_send_cmd_common(struct fsl_esdhc_priv *priv, struct mmc *mmc,
 
        /* Workaround for ESDHC errata ENGcm03648 */
        if (!data && (cmd->resp_type & MMC_RSP_BUSY)) {
-               int timeout = 6000;
+               int timeout = 50000;
 
-               /* Poll on DATA0 line for cmd with busy signal for 600 ms */
+               /* Poll on DATA0 line for cmd with busy signal for 5000 ms */
                while (timeout > 0 && !(esdhc_read32(&regs->prsstat) &
                                        PRSSTAT_DAT0)) {
                        udelay(100);