]> git.sur5r.net Git - u-boot/commitdiff
mmc: sdhci: Add support for disabling clock
authorSiva Durga Prasad Paladugu <sivadur@xilinx.com>
Thu, 19 Apr 2018 07:07:04 +0000 (12:37 +0530)
committerMichal Simek <michal.simek@xilinx.com>
Fri, 11 May 2018 07:38:27 +0000 (09:38 +0200)
This patch adds support to disable clock if clk_disable
was set and then enable or set clock if the clock was changed
or clock was disabled when clock needs to be enabled.

Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
drivers/mmc/sdhci.c

index c2ae3e327bf0ebf3d607f13e4cdabdb30544bd8c..d7acab1f85b3d84b3302f92538daf39025ed6bea 100644 (file)
@@ -439,6 +439,9 @@ static int sdhci_set_ios(struct mmc *mmc)
        if (mmc->clock != host->clock)
                sdhci_set_clock(mmc, mmc->clock);
 
+       if (mmc->clk_disable)
+               sdhci_set_clock(mmc, 0);
+
        /* Set bus width */
        ctrl = sdhci_readb(host, SDHCI_HOST_CONTROL);
        if (mmc->bus_width == 8) {