mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-10 22:40:54 -04:00
mmc: sdhci-msm: Ensure larger discard size
Discard size calculation uses max_busy_timeout in deriving the value. So, we can ensure a larger discard size by setting this timeout as zero. If this timeout is zero then it takes max erase timeout vlaue (which is 60sec) in the discard size calculation. And qcom SDHC can support h/w based busy detection, So we need set MMC_CAP_NEED_RSP_BUSY capability flag. Since Qcom SDHC can support h/w based busy detection for R1b commands, this timeout value is not relevant for us. Setting it zero won't affect in any operation provied MMC_CAP_NEED_RSP_BUSY cap is set. Change-Id: Ib20a1e536d2e24cf8de1e927715a8a3aa7f0ae27 Signed-off-by: Veerabhadrarao Badiganti <vbadigan@codeaurora.org>
This commit is contained in:
parent
bf4eaa44f7
commit
930e70e995
1 changed files with 15 additions and 2 deletions
|
|
@ -3214,8 +3214,7 @@ static int sdhci_msm_probe(struct platform_device *pdev)
|
|||
|
||||
msm_host->mmc->caps |= MMC_CAP_AGGRESSIVE_PM;
|
||||
msm_host->mmc->caps |= MMC_CAP_WAIT_WHILE_BUSY;
|
||||
|
||||
msm_host->pltfm_init_done = true;
|
||||
msm_host->mmc->caps |= MMC_CAP_NEED_RSP_BUSY;
|
||||
|
||||
#if defined(CONFIG_SDC_QTI)
|
||||
msm_host->mmc->caps2 |= MMC_CAP2_CLK_SCALE;
|
||||
|
|
@ -3233,6 +3232,20 @@ static int sdhci_msm_probe(struct platform_device *pdev)
|
|||
goto pm_runtime_disable;
|
||||
sdhci_msm_set_regulator_caps(msm_host);
|
||||
|
||||
/*
|
||||
* Ensure larger discard size by setting max_busy_timeout.
|
||||
* This has to set only after sdhci_add_host so that our
|
||||
* value won't be over-written.
|
||||
*/
|
||||
host->mmc->max_busy_timeout = 0;
|
||||
|
||||
/*
|
||||
* Set platfm_init_done only after sdhci_add_host().
|
||||
* So that we don't turn off vqmmc while we reset sdhc as
|
||||
* part of sdhci_add_host().
|
||||
*/
|
||||
msm_host->pltfm_init_done = true;
|
||||
|
||||
pm_runtime_mark_last_busy(&pdev->dev);
|
||||
pm_runtime_put_autosuspend(&pdev->dev);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue