sdhci: Runtime host clk enable/disable
Pavan Kunapuli [Fri, 11 Nov 2011 10:59:30 +0000 (15:59 +0530)]
Adding support for runtime host controller
clk enable/disable.

Bug 887981

Change-Id: Ib0a49048040af939458dd44c54ce57adda562fe3
Reviewed-on: http://git-master/r/63283
Reviewed-by: Lokesh Pathak <lpathak@nvidia.com>
Tested-by: Lokesh Pathak <lpathak@nvidia.com>

Rebase-Id: R9946d64519b2ce9a3b588cbcecb59f5a556ddd69

drivers/mmc/host/sdhci.c

index 08b710f..29ab393 100644 (file)
@@ -1826,8 +1826,11 @@ int sdhci_enable(struct mmc_host *mmc)
        if (!mmc->card || mmc->card->type == MMC_TYPE_SDIO)
                return 0;
 
-       if (mmc->ios.clock)
+       if (mmc->ios.clock) {
+               if (host->ops->set_clock)
+                       host->ops->set_clock(host, mmc->ios.clock);
                sdhci_set_clock(host, mmc->ios.clock);
+       }
 
        return 0;
 }
@@ -1840,6 +1843,8 @@ int sdhci_disable(struct mmc_host *mmc, int lazy)
                return 0;
 
        sdhci_set_clock(host, 0);
+       if (host->ops->set_clock)
+               host->ops->set_clock(host, 0);
 
        return 0;
 }