From: Siva Durga Prasad Paladugu <[email protected]>

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

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) {
--
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.
_______________________________________________
U-Boot mailing list
[email protected]
https://lists.denx.de/listinfo/u-boot

Reply via email to