mirror of
https://github.com/torvalds/linux.git
synced 2026-05-26 08:02:27 +02:00
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 commitfb3bbc46c9. Cc: Erick Shepherd <erick.shepherd@ni.com> Cc: stable@vger.kernel.org Fixes:fb3bbc46c9("mmc: sdhci: Disable SD card clock before changing parameters") Suggested-by: Adrian Hunter <adrian.hunter@intel.com> Reported-by: Jonathan Liu <net147@gmail.com> Reported-by: Salvatore Bonaccorso <carnil@debian.org> Closes: https://bugs.debian.org/1108065 Acked-by: Adrian Hunter <adrian.hunter@intel.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> Link: https://lore.kernel.org/r/20250624110932.176925-1-ulf.hansson@linaro.org
This commit is contained in:
parent
49b14db035
commit
dcc3bcfc5b
|
|
@ -2065,15 +2065,10 @@ void sdhci_set_clock(struct sdhci_host *host, unsigned int clock)
|
|||
|
||||
host->mmc->actual_clock = 0;
|
||||
|
||||
clk = sdhci_readw(host, SDHCI_CLOCK_CONTROL);
|
||||
if (clk & SDHCI_CLOCK_CARD_EN)
|
||||
sdhci_writew(host, clk & ~SDHCI_CLOCK_CARD_EN,
|
||||
SDHCI_CLOCK_CONTROL);
|
||||
sdhci_writew(host, 0, SDHCI_CLOCK_CONTROL);
|
||||
|
||||
if (clock == 0) {
|
||||
sdhci_writew(host, 0, SDHCI_CLOCK_CONTROL);
|
||||
if (clock == 0)
|
||||
return;
|
||||
}
|
||||
|
||||
clk = sdhci_calc_clk(host, clock, &host->mmc->actual_clock);
|
||||
sdhci_enable_clk(host, clk);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user