]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/mmc/host/sdhci.c
sdhci: Add set_clock callback and a quirk for nonstandard clocks
[linux-2.6-omap-h63xx.git] / drivers / mmc / host / sdhci.c
index 34ab77bd12ae15afa76be8fe7a41c7a39cc929ed..75d0ecbce10c9857bed947d154bdde16955b3334 100644 (file)
@@ -949,6 +949,12 @@ static void sdhci_set_clock(struct sdhci_host *host, unsigned int clock)
        if (clock == host->clock)
                return;
 
+       if (host->ops->set_clock) {
+               host->ops->set_clock(host, clock);
+               if (host->quirks & SDHCI_QUIRK_NONSTANDARD_CLOCK)
+                       return;
+       }
+
        sdhci_writew(host, 0, SDHCI_CLOCK_CONTROL);
 
        if (clock == 0)