Skip to content

Commit dcc3bcf

Browse files
committed
Revert "mmc: sdhci: Disable SD card clock before changing parameters"
It has turned out the trying to strictly conform to the SDHCI specification is causing problems. Let's revert and start over. This reverts commit fb3bbc4. Cc: Erick Shepherd <[email protected]> Cc: [email protected] Fixes: fb3bbc4 ("mmc: sdhci: Disable SD card clock before changing parameters") Suggested-by: Adrian Hunter <[email protected]> Reported-by: Jonathan Liu <[email protected]> Reported-by: Salvatore Bonaccorso <[email protected]> Closes: https://bugs.debian.org/1108065 Acked-by: Adrian Hunter <[email protected]> Signed-off-by: Ulf Hansson <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 49b14db commit dcc3bcf

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

drivers/mmc/host/sdhci.c

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2065,15 +2065,10 @@ void sdhci_set_clock(struct sdhci_host *host, unsigned int clock)
20652065

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

2068-
clk = sdhci_readw(host, SDHCI_CLOCK_CONTROL);
2069-
if (clk & SDHCI_CLOCK_CARD_EN)
2070-
sdhci_writew(host, clk & ~SDHCI_CLOCK_CARD_EN,
2071-
SDHCI_CLOCK_CONTROL);
2068+
sdhci_writew(host, 0, SDHCI_CLOCK_CONTROL);
20722069

2073-
if (clock == 0) {
2074-
sdhci_writew(host, 0, SDHCI_CLOCK_CONTROL);
2070+
if (clock == 0)
20752071
return;
2076-
}
20772072

20782073
clk = sdhci_calc_clk(host, clock, &host->mmc->actual_clock);
20792074
sdhci_enable_clk(host, clk);

0 commit comments

Comments
 (0)