Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 30832ab5 authored by Todd Poynor's avatar Todd Poynor Committed by Chris Ball
Browse files

mmc: sdhci: Always pass clock request value zero to set_clock host op



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: default avatarTodd Poynor <toddpoynor@google.com>
Acked-by: default avatarAdrian Hunter <adrian.hunter@intel.com>
Signed-off-by: default avatarChris Ball <cjb@laptop.org>
parent e2a0a582
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -1068,7 +1068,7 @@ static void sdhci_set_clock(struct sdhci_host *host, unsigned int clock)
	u16 clk = 0;
	u16 clk = 0;
	unsigned long timeout;
	unsigned long timeout;


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


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