File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -239,15 +239,19 @@ static inline void _sdhci_sprd_set_clock(struct sdhci_host *host,
239
239
div = ((div & 0x300 ) >> 2 ) | ((div & 0xFF ) << 8 );
240
240
sdhci_enable_clk (host , div );
241
241
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 ;
242
244
/* Enable CLK_AUTO when the clock is greater than 400K. */
243
245
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 ;
247
246
if (mask != (val & mask )) {
248
247
val |= mask ;
249
248
sdhci_writel (host , val , SDHCI_SPRD_REG_32_BUSY_POSI );
250
249
}
250
+ } else {
251
+ if (val & mask ) {
252
+ val &= ~mask ;
253
+ sdhci_writel (host , val , SDHCI_SPRD_REG_32_BUSY_POSI );
254
+ }
251
255
}
252
256
}
253
257
You can’t perform that action at this time.
0 commit comments