diff options
author | Siva Durga Prasad Paladugu <sivadur@xilinx.com> | 2018-04-19 12:37:04 +0530 |
---|---|---|
committer | Michal Simek <michal.simek@xilinx.com> | 2018-05-11 09:38:27 +0200 |
commit | 2a2d7efe77f771e2776de6b360be264de12818d8 (patch) | |
tree | 7a13e6ea3ef65b0297dfa58175f3067579fe1d26 /drivers | |
parent | 36332b6e4b122e0bdb43eb992533bdd911b6c030 (diff) | |
download | u-boot-2a2d7efe77f771e2776de6b360be264de12818d8.tar.gz u-boot-2a2d7efe77f771e2776de6b360be264de12818d8.tar.xz u-boot-2a2d7efe77f771e2776de6b360be264de12818d8.zip |
mmc: sdhci: Add support for disabling clock
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>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/mmc/sdhci.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/mmc/sdhci.c b/drivers/mmc/sdhci.c index c2ae3e327b..d7acab1f85 100644 --- a/drivers/mmc/sdhci.c +++ b/drivers/mmc/sdhci.c @@ -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) { |