diff options
-rw-r--r-- | drivers/mmc/host/sdhci.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c index 12015151fab9..b0a5629dea3e 100644 --- a/drivers/mmc/host/sdhci.c +++ b/drivers/mmc/host/sdhci.c | |||
@@ -245,6 +245,18 @@ static void sdhci_init(struct sdhci_host *host, int soft) | |||
245 | static void sdhci_reinit(struct sdhci_host *host) | 245 | static void sdhci_reinit(struct sdhci_host *host) |
246 | { | 246 | { |
247 | sdhci_init(host, 0); | 247 | sdhci_init(host, 0); |
248 | /* | ||
249 | * Retuning stuffs are affected by different cards inserted and only | ||
250 | * applicable to UHS-I cards. So reset these fields to their initial | ||
251 | * value when card is removed. | ||
252 | */ | ||
253 | if (host->version >= SDHCI_SPEC_300 && host->tuning_count && | ||
254 | host->tuning_mode == SDHCI_TUNING_MODE_1) { | ||
255 | del_timer_sync(&host->tuning_timer); | ||
256 | host->flags &= ~SDHCI_NEEDS_RETUNING; | ||
257 | host->mmc->max_blk_count = | ||
258 | (host->quirks & SDHCI_QUIRK_NO_MULTIBLOCK) ? 1 : 65535; | ||
259 | } | ||
248 | sdhci_enable_card_detection(host); | 260 | sdhci_enable_card_detection(host); |
249 | } | 261 | } |
250 | 262 | ||