SDHCI has separate controls for the internal clock and enabling the clock signal to the card. The card clock signal was disabled via SDHCI_CLOCK_CARD_EN to avoid glitches on the clock line. It is not necessary to reset the internal clock to re-enable it. Instead re-enable by re-asserting SDHCI_CLOCK_CARD_EN. Tested-by: Haibo Chen <haibo.chen@xxxxxxx> Signed-off-by: Adrian Hunter <adrian.hunter@xxxxxxxxx> --- drivers/mmc/host/sdhci.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c index beb1fe643634..9a245d5c532b 100644 --- a/drivers/mmc/host/sdhci.c +++ b/drivers/mmc/host/sdhci.c @@ -2452,8 +2452,11 @@ void sdhci_set_ios(struct mmc_host *mmc, struct mmc_ios *ios) host->drv_type = ios->drv_type; } - /* Re-enable SD Clock */ - host->ops->set_clock(host, host->clock); + if (ios->clock) { + clk = sdhci_readw(host, SDHCI_CLOCK_CONTROL); + clk |= SDHCI_CLOCK_CARD_EN; + sdhci_writew(host, clk, SDHCI_CLOCK_CONTROL); + } } else sdhci_writeb(host, ctrl, SDHCI_HOST_CONTROL); } -- 2.34.1