mmc: host: rk_sdmmc:
authorlin tao <lt@mid-server3.(none)>
Tue, 17 Jun 2014 00:44:28 +0000 (08:44 +0800)
committerlin tao <lt@mid-server3.(none)>
Tue, 17 Jun 2014 00:44:28 +0000 (08:44 +0800)
Support poll-hw-reset for emmc devices with vccq always on,
that may fail boot since devices cannot enter pre-idle in this case.
No sense send CMD12 and wait DTO when booting recommended by dw-spec.
Default no attribute poll-hw-reset in dts.

drivers/mmc/host/rk_sdmmc.c

index cd90dd624c1718c53caf63d3d50591ddfc6b1042..a9f689b0e7c8deb68458efd468d36222357ae575 100755 (executable)
@@ -1369,6 +1369,7 @@ static void dw_mci_hw_reset(struct mmc_host *mmc)
        unsigned long timeout;
        bool ret = true;
 
+        #if 0
         /* (1) CMD12 to end any transfer in process */
         cmd_flags = SDMMC_CMD_STOP | SDMMC_CMD_RESP_CRC
                        | SDMMC_CMD_RESP_EXP | MMC_STOP_TRANSMISSION;
@@ -1390,7 +1391,7 @@ static void dw_mci_hw_reset(struct mmc_host *mmc)
                MMC_DBG_ERR_FUNC(host->mmc,
                        "%s dw_mci_hw_reset: STOP_TRANSMISSION failed!!! [%s]\n",
                        __func__, mmc_hostname(host->mmc));
-
+        
        /* (2) wait DTO, even if no response is sent back by card */
        ret = true;
        timeout = jiffies + msecs_to_jiffies(5);
@@ -1401,8 +1402,9 @@ static void dw_mci_hw_reset(struct mmc_host *mmc)
                        break;
                }
        }
+        #endif
 
-       /* (3) Reset following: DONNOT CHANGE RESET ORDER!*/
+        /* (3) Reset following: DONNOT CHANGE RESET ORDER!*/
 
        /* Software reset - BMOD[0] for IDMA only */
        regs = mci_readl(host, BMOD);