Skip to content

Commit

Permalink
mmc: dw_mmc: rockchip: Don't recalc the clock when it goes off
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Doug Anderson authored and Ulf Hansson committed Nov 10, 2014
1 parent b19caf3 commit e779107
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/mmc/host/dw_mmc-rockchip.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit e779107

Please sign in to comment.