summaryrefslogtreecommitdiffstats
path: root/drivers/mmc/host/sdhci-esdhc-imx.c
diff options
context:
space:
mode:
authorRussell King2014-04-25 13:58:50 +0200
committerChris Ball2014-05-22 13:26:31 +0200
commit1650d0c71a209c7d6bdddda8a7e187c537ceb71a (patch)
treeaca71fbf4f02d1b6eacb3f6ce07d837dc2ab33ec /drivers/mmc/host/sdhci-esdhc-imx.c
parentmmc: sdhci: move setting host->clock into sdhci_do_set_ios() (diff)
downloadkernel-qcow2-linux-1650d0c71a209c7d6bdddda8a7e187c537ceb71a.tar.gz
kernel-qcow2-linux-1650d0c71a209c7d6bdddda8a7e187c537ceb71a.tar.xz
kernel-qcow2-linux-1650d0c71a209c7d6bdddda8a7e187c537ceb71a.zip
mmc: sdhci: move setting mmc->actual_clock into set_clock handlers
Move the setting of mmc->actual_clock to zero into the set_clock handlers themselves. This will allow us to clean up the calling logic for the set_clock() method, and turn sdhci_set_clock() into a library function. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> Tested-by: Markus Pargmann <mpa@pengutronix.de> Tested-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> Signed-off-by: Chris Ball <chris@printf.net>
Diffstat (limited to 'drivers/mmc/host/sdhci-esdhc-imx.c')
-rw-r--r--drivers/mmc/host/sdhci-esdhc-imx.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/mmc/host/sdhci-esdhc-imx.c b/drivers/mmc/host/sdhci-esdhc-imx.c
index 1e68a77c9987..ce8939ff97a4 100644
--- a/drivers/mmc/host/sdhci-esdhc-imx.c
+++ b/drivers/mmc/host/sdhci-esdhc-imx.c
@@ -600,6 +600,8 @@ static inline void esdhc_pltfm_set_clock(struct sdhci_host *host,
u32 temp, val;
if (clock == 0) {
+ host->mmc->actual_clock = 0;
+
if (esdhc_is_usdhc(imx_data)) {
val = readl(host->ioaddr + ESDHC_VENDOR_SPEC);
writel(val & ~ESDHC_VENDOR_SPEC_FRC_SDCLK_ON,