Skip to content

Commit 1cfd0a3

Browse files
committed
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 <[email protected]>
2 parents 6738025 + 8abf77c commit 1cfd0a3

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

drivers/mmc/host/sdhci-sprd.c

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -239,15 +239,19 @@ static inline void _sdhci_sprd_set_clock(struct sdhci_host *host,
239239
div = ((div & 0x300) >> 2) | ((div & 0xFF) << 8);
240240
sdhci_enable_clk(host, div);
241241

242+
val = sdhci_readl(host, SDHCI_SPRD_REG_32_BUSY_POSI);
243+
mask = SDHCI_SPRD_BIT_OUTR_CLK_AUTO_EN | SDHCI_SPRD_BIT_INNR_CLK_AUTO_EN;
242244
/* Enable CLK_AUTO when the clock is greater than 400K. */
243245
if (clk > 400000) {
244-
val = sdhci_readl(host, SDHCI_SPRD_REG_32_BUSY_POSI);
245-
mask = SDHCI_SPRD_BIT_OUTR_CLK_AUTO_EN |
246-
SDHCI_SPRD_BIT_INNR_CLK_AUTO_EN;
247246
if (mask != (val & mask)) {
248247
val |= mask;
249248
sdhci_writel(host, val, SDHCI_SPRD_REG_32_BUSY_POSI);
250249
}
250+
} else {
251+
if (val & mask) {
252+
val &= ~mask;
253+
sdhci_writel(host, val, SDHCI_SPRD_REG_32_BUSY_POSI);
254+
}
251255
}
252256
}
253257

0 commit comments

Comments
 (0)