Skip to content

Commit

Permalink
mmc: sdhci: Always pass clock request value zero to set_clock host op
Browse files Browse the repository at this point in the history
To allow the set_clock host op to disable the SDCLK source when not
needed, always call the host op when the requested clock speed is
zero.  Do this even if host->clock already equals zero, because
the SDHCI driver may set that value (without calling the host op)
to force an update at the next (non-zero-speed) call.

Signed-off-by: Todd Poynor <toddpoynor@google.com>
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
  • Loading branch information
Todd Poynor authored and Chris Ball committed Jan 12, 2012
1 parent e2a0a58 commit 30832ab
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/mmc/host/sdhci.c
Original file line number Diff line number Diff line change
Expand Up @@ -1068,7 +1068,7 @@ static void sdhci_set_clock(struct sdhci_host *host, unsigned int clock)
u16 clk = 0;
unsigned long timeout;

if (clock == host->clock)
if (clock && clock == host->clock)
return;

host->mmc->actual_clock = 0;
Expand Down

0 comments on commit 30832ab

Please sign in to comment.