summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRitesh Harjani <riteshh@codeaurora.org>2015-08-05 11:27:00 +0530
committerSubhash Jadavani <subhashj@codeaurora.org>2016-05-31 15:27:22 -0700
commit35f2004cf997cd3969d00245debeecb2733da783 (patch)
tree909c56adad1ed1783d3d94106a7615dbf1166909
parent085c9196375e463476300d02691c249d1ca00362 (diff)
mmc: sdhci-msm: Set MMC_CAP_WAIT_WHILE_BUSY capability
For any cmd we have a DAT line timeouts which we set in TIMEOUT_CONTROL register of sdhci. For commands with busy response (R1B), cmd is followed by a busy period exercised by card, by pulling DAT0 line low (in case of CMD5). Here host controller detects this busy period and waits for either busy period to finish or timeout to happen based on value set in SDHCI_TIMEOUT_CONTROL register. Thus for R1B commands, host controller(sdhci) is capable of sending two interrupts. 1st is the CMD response(0th bit - Command complete of Normal Interrupt Status register ) and 2nd is when the busy period has ended(1st bit - Transfer Complete bit of Normal Interrupt Status register). If MMC_CAP_WAIT_WHILE_BUSY is not enabled by the host controller driver then core layer explictely waits for fixed amount time specified by s_a_timeout parameter which is generally very high when compared to amount of time card keeps the DAT0 line low. As sdhci-msm is capable of detecting this busy period, set MMC_CAP_WAIT_WHILE_BUSY capability in the host controller driver to avoid redundant wait period. On 8952 this saves us ~110ms during mmc suspend. Change-Id: Ibb3a70575a06a5ffd1ccc3adaa96dfb3c3e22e3a Signed-off-by: Ritesh Harjani <riteshh@codeaurora.org>
-rw-r--r--drivers/mmc/host/sdhci-msm.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/mmc/host/sdhci-msm.c b/drivers/mmc/host/sdhci-msm.c
index 71e76c97172f..d85a065fe2d1 100644
--- a/drivers/mmc/host/sdhci-msm.c
+++ b/drivers/mmc/host/sdhci-msm.c
@@ -3462,6 +3462,7 @@ static int sdhci_msm_probe(struct platform_device *pdev)
msm_host->mmc->caps |= msm_host->pdata->mmc_bus_width;
msm_host->mmc->caps |= msm_host->pdata->caps;
msm_host->mmc->caps |= MMC_CAP_AGGRESSIVE_PM;
+ msm_host->mmc->caps |= MMC_CAP_WAIT_WHILE_BUSY;
msm_host->mmc->caps2 |= msm_host->pdata->caps2;
msm_host->mmc->caps2 |= MMC_CAP2_BOOTPART_NOACC;
msm_host->mmc->caps2 |= MMC_CAP2_FULL_PWR_CYCLE;