Skip to contentSkip to conversation

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

PATCH New Adrian Hunter 1 participant 1 message Dec 9, 2011

Subsystems (2)
lore
Share & tools
lore

Adrian Hunter

author maintainer
#0 lore raw

PATCH 1/1 sdhci: Always pass clock request value zero to set_clock host op

From: Todd Poynor <[email protected]>

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.

---
 drivers/mmc/host/sdhci.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/mmc/host/sdhci.c +1 -1
index ab6018f..92332a1 100644
@@ -1070,7 +1070,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;
Signature · 1 line
1.7.6.4