Skip to content

Commit

Permalink
mmc: sdhci-msm: Use maximum possible data timeout value
Browse files Browse the repository at this point in the history
The Qcom SD controller defines the usage of 0xF in data
timeout counter register (0x2E) which is actually a reserved
bit as per specification. This would result in maximum of 21.26 secs
timeout value.

Some SDcard taking more time than 2.67secs (timeout value corresponding
to 0xE) and with that observed data timeout errors.
So increasing the timeout value to max possible timeout.

Signed-off-by: Sahitya Tummala <[email protected]>
Signed-off-by: Sarthak Garg <[email protected]>
Acked-by: Adrian Hunter <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Ulf Hansson <[email protected]>
  • Loading branch information
Sahitya Tummala authored and storulf committed Aug 24, 2021
1 parent e30314f commit ed78a03
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/mmc/host/sdhci-msm.c
Original file line number Diff line number Diff line change
Expand Up @@ -2714,6 +2714,9 @@ static int sdhci_msm_probe(struct platform_device *pdev)

msm_host->mmc->caps |= MMC_CAP_WAIT_WHILE_BUSY | MMC_CAP_NEED_RSP_BUSY;

/* Set the timeout value to max possible */
host->max_timeout_count = 0xF;

pm_runtime_get_noresume(&pdev->dev);
pm_runtime_set_active(&pdev->dev);
pm_runtime_enable(&pdev->dev);
Expand Down

0 comments on commit ed78a03

Please sign in to comment.