diff options
-rw-r--r-- | drivers/mmc/host/sdhci.c | 8 | ||||
-rw-r--r-- | drivers/mmc/host/sdhci.h | 1 | ||||
-rw-r--r-- | include/linux/mmc/sdhci.h | 2 |
3 files changed, 11 insertions, 0 deletions
diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c index 417fdd1721f2..b1dd628ac648 100644 --- a/drivers/mmc/host/sdhci.c +++ b/drivers/mmc/host/sdhci.c @@ -1632,6 +1632,14 @@ static int sdhci_execute_tuning(struct mmc_host *mmc) disable_irq(host->irq); spin_lock(&host->lock); + if ((host->quirks & SDHCI_QUIRK_NON_STANDARD_TUNING) && + host->ops->execute_freq_tuning) { + err = host->ops->execute_freq_tuning(host); + spin_unlock(&host->lock); + enable_irq(host->irq); + return err; + } + ctrl = sdhci_readw(host, SDHCI_HOST_CONTROL2); /* diff --git a/drivers/mmc/host/sdhci.h b/drivers/mmc/host/sdhci.h index 1c12419f9d64..bdf4b1055462 100644 --- a/drivers/mmc/host/sdhci.h +++ b/drivers/mmc/host/sdhci.h @@ -277,6 +277,7 @@ struct sdhci_ops { int (*resume)(struct sdhci_host *host); int (*switch_signal_voltage)(struct sdhci_host *host, unsigned int signal_voltage); + int (*execute_freq_tuning)(struct sdhci_host *sdhci); }; #ifdef CONFIG_MMC_SDHCI_IO_ACCESSORS diff --git a/include/linux/mmc/sdhci.h b/include/linux/mmc/sdhci.h index 85e7850b88af..19abccaf0fb0 100644 --- a/include/linux/mmc/sdhci.h +++ b/include/linux/mmc/sdhci.h @@ -89,6 +89,8 @@ struct sdhci_host { #define SDHCI_QUIRK_UNSTABLE_RO_DETECT (1ULL<<31) /* Controller cannot report the line status in present state register */ #define SDHCI_QUIRK_NON_STD_VOLTAGE_SWITCHING (1ULL<<32) +/* Controller doesn't follow the standard frequency tuning procedure */ +#define SDHCI_QUIRK_NON_STANDARD_TUNING (1LL<<33) int irq; /* Device IRQ */ void __iomem *ioaddr; /* Mapped address */ |