diff mbox series

[U-Boot,v3,1/7] mmc: sdhci: Add support for disabling clock

Message ID 1524121630-13933-2-git-send-email-siva.durga.paladugu@xilinx.com
State Accepted
Delegated to: Michal Simek
Headers show
Series Add support of SD3.0 UHS modes for ZynqMP | expand

Commit Message

Siva Durga Prasad Paladugu April 19, 2018, 7:07 a.m. UTC
From: Siva Durga Prasad Paladugu <sivadur@xilinx.com>

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>
---
Changes in v3:
- Removed clk_disabled in sdhci_host structure
---
 drivers/mmc/sdhci.c | 3 +++
 1 file changed, 3 insertions(+)

--
2.7.4

This email and any attachments are intended for the sole use of the named recipient(s) and contain(s) confidential information that may be proprietary, privileged or copyrighted under applicable law. If you are not the intended recipient, do not read, copy, or forward this email message or any attachments. Delete this email message and any attachments immediately.
diff mbox series

Patch

diff --git a/drivers/mmc/sdhci.c b/drivers/mmc/sdhci.c
index d31793a..73d17d7 100644
--- a/drivers/mmc/sdhci.c
+++ b/drivers/mmc/sdhci.c
@@ -440,6 +440,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) {