summaryrefslogtreecommitdiff
path: root/drivers/mmc/host/dw_mmc-rockchip.c
diff options
context:
space:
mode:
authorDoug Anderson <dianders@chromium.org>2014-10-14 20:39:12 +0400
committerUlf Hansson <ulf.hansson@linaro.org>2014-11-10 14:40:36 +0300
commite7791079ae89d91024019e11a1f430d38c491246 (patch)
treebc2fe86bbf00308cca6757c07e4796b60ce71098 /drivers/mmc/host/dw_mmc-rockchip.c
parentb19caf379c82e99737c29bc15d7b7fd7d24279f9 (diff)
downloadlinux-e7791079ae89d91024019e11a1f430d38c491246.tar.xz
mmc: dw_mmc: rockchip: Don't recalc the clock when it goes off
The "set_ios" function is called with a clock of 0 when the clock is turning off. There's no reason to go through all the extra Rockchip logic (whose goal is to make sure DIV is 0 or 1) in that case. The Rockchip logic happened to work because the CCF will pick the lowest possible rate when you ask it for a clock of 0, but it's silly to go through all the remuxing and adjusting for no reason. Signed-off-by: Doug Anderson <dianders@chromium.org> Acked-by: Jaehoon Chung <jh80.chung@samsung.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Diffstat (limited to 'drivers/mmc/host/dw_mmc-rockchip.c')
-rw-r--r--drivers/mmc/host/dw_mmc-rockchip.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/mmc/host/dw_mmc-rockchip.c b/drivers/mmc/host/dw_mmc-rockchip.c
index f0c2cb1a210d..bbb4ec386e56 100644
--- a/drivers/mmc/host/dw_mmc-rockchip.c
+++ b/drivers/mmc/host/dw_mmc-rockchip.c
@@ -37,6 +37,9 @@ static void dw_mci_rk3288_set_ios(struct dw_mci *host, struct mmc_ios *ios)
unsigned int cclkin;
u32 bus_hz;
+ if (ios->clock == 0)
+ return;
+
/*
* cclkin: source clock of mmc controller
* bus_hz: card interface clock generated by CLKGEN