diff options
author | Ulf Hansson <ulf.hansson@linaro.org> | 2024-01-03 15:17:56 +0300 |
---|---|---|
committer | Ulf Hansson <ulf.hansson@linaro.org> | 2024-01-03 15:17:56 +0300 |
commit | 1cfd0a3e5eeacf9009c2b4c7a8884312678553b1 (patch) | |
tree | 63d908ff0ed5b1e2cdbe86616985b19661fc1cb7 | |
parent | 67380251e8bbd3302c64fea07f95c31971b91c22 (diff) | |
parent | 8abf77c88929b6d20fa4f9928b18d6448d64e293 (diff) | |
download | linux-1cfd0a3e5eeacf9009c2b4c7a8884312678553b1.tar.xz |
mmc: Merge branch fixes into next
Merge the mmc fixes for v6.7-rc[n] into the next branch, to allow them to
get tested together with the new mmc changes that are targeted for v6.8.
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
-rw-r--r-- | drivers/mmc/host/sdhci-sprd.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/drivers/mmc/host/sdhci-sprd.c b/drivers/mmc/host/sdhci-sprd.c index 6b8a57e2d20f..bed57a1c64b5 100644 --- a/drivers/mmc/host/sdhci-sprd.c +++ b/drivers/mmc/host/sdhci-sprd.c @@ -239,15 +239,19 @@ static inline void _sdhci_sprd_set_clock(struct sdhci_host *host, div = ((div & 0x300) >> 2) | ((div & 0xFF) << 8); sdhci_enable_clk(host, div); + val = sdhci_readl(host, SDHCI_SPRD_REG_32_BUSY_POSI); + mask = SDHCI_SPRD_BIT_OUTR_CLK_AUTO_EN | SDHCI_SPRD_BIT_INNR_CLK_AUTO_EN; /* Enable CLK_AUTO when the clock is greater than 400K. */ if (clk > 400000) { - val = sdhci_readl(host, SDHCI_SPRD_REG_32_BUSY_POSI); - mask = SDHCI_SPRD_BIT_OUTR_CLK_AUTO_EN | - SDHCI_SPRD_BIT_INNR_CLK_AUTO_EN; if (mask != (val & mask)) { val |= mask; sdhci_writel(host, val, SDHCI_SPRD_REG_32_BUSY_POSI); } + } else { + if (val & mask) { + val &= ~mask; + sdhci_writel(host, val, SDHCI_SPRD_REG_32_BUSY_POSI); + } } } |