From 2098730fcd78fb7e7bc5a1ada97881d1a9b1d5b3 Mon Sep 17 00:00:00 2001 From: lin tao Date: Tue, 17 Jun 2014 08:44:28 +0800 Subject: [PATCH] mmc: host: rk_sdmmc: 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 | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/mmc/host/rk_sdmmc.c b/drivers/mmc/host/rk_sdmmc.c index cd90dd624c17..a9f689b0e7c8 100755 --- a/drivers/mmc/host/rk_sdmmc.c +++ b/drivers/mmc/host/rk_sdmmc.c @@ -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); -- 2.34.1