diff options
| author | Asutosh Das <asutoshd@codeaurora.org> | 2013-10-21 17:17:03 +0530 |
|---|---|---|
| committer | Subhash Jadavani <subhashj@codeaurora.org> | 2016-05-27 10:28:56 -0700 |
| commit | 2c530476d3898b8ab1d3d12df02bf96faf2e43bb (patch) | |
| tree | 4cf1bad08bdb34d5d943a04f18b559649fb6bb8e | |
| parent | 9df7e24765adf7c69bee96171ee24571024ea8aa (diff) | |
mmc: sdhci: Use max timeout and skip timeout calculation
Several data-timeout issues were seen, most of which were
due to the card taking a longer time to respond. This patch
increases the timeout of the controller to 0xF i.e. max
possible.
Change-Id: I6739de3eb5d9cccf8e39d9dc4730056782334162
CRs-Fixed: 536832
Signed-off-by: Asutosh Das <asutoshd@codeaurora.org>
| -rw-r--r-- | drivers/mmc/host/sdhci.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c index 0a7a599588df..0394eaf50d86 100644 --- a/drivers/mmc/host/sdhci.c +++ b/drivers/mmc/host/sdhci.c @@ -717,6 +717,12 @@ static u8 sdhci_calc_timeout(struct sdhci_host *host, struct mmc_command *cmd) if (host->quirks & SDHCI_QUIRK_BROKEN_TIMEOUT_VAL) return 0xE; + /* During initialization, don't use max timeout as the clock is slow */ + if ((host->quirks2 & SDHCI_QUIRK2_USE_RESERVED_MAX_TIMEOUT) && + (host->clock > 400000)) { + return 0xF; + } + /* Unspecified timeout, assume max */ if (!data && !cmd->busy_timeout) return 0xE; |
