|
@@ -245,6 +245,18 @@ static void sdhci_init(struct sdhci_host *host, int soft)
|
|
|
static void sdhci_reinit(struct sdhci_host *host)
|
|
|
{
|
|
|
sdhci_init(host, 0);
|
|
|
+ /*
|
|
|
+ * Retuning stuffs are affected by different cards inserted and only
|
|
|
+ * applicable to UHS-I cards. So reset these fields to their initial
|
|
|
+ * value when card is removed.
|
|
|
+ */
|
|
|
+ if (host->version >= SDHCI_SPEC_300 && host->tuning_count &&
|
|
|
+ host->tuning_mode == SDHCI_TUNING_MODE_1) {
|
|
|
+ del_timer_sync(&host->tuning_timer);
|
|
|
+ host->flags &= ~SDHCI_NEEDS_RETUNING;
|
|
|
+ host->mmc->max_blk_count =
|
|
|
+ (host->quirks & SDHCI_QUIRK_NO_MULTIBLOCK) ? 1 : 65535;
|
|
|
+ }
|
|
|
sdhci_enable_card_detection(host);
|
|
|
}
|
|
|
|