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 @@ -224,15 +224,19 @@ static inline void _sdhci_sprd_set_clock(struct sdhci_host *host,
224
224
div = ((div & 0x300 ) >> 2 ) | ((div & 0xFF ) << 8 );
225
225
sdhci_enable_clk (host , div );
226
226
227
+ val = sdhci_readl (host , SDHCI_SPRD_REG_32_BUSY_POSI );
228
+ mask = SDHCI_SPRD_BIT_OUTR_CLK_AUTO_EN | SDHCI_SPRD_BIT_INNR_CLK_AUTO_EN ;
227
229
/* Enable CLK_AUTO when the clock is greater than 400K. */
228
230
if (clk > 400000 ) {
229
- val = sdhci_readl (host , SDHCI_SPRD_REG_32_BUSY_POSI );
230
- mask = SDHCI_SPRD_BIT_OUTR_CLK_AUTO_EN |
231
- SDHCI_SPRD_BIT_INNR_CLK_AUTO_EN ;
232
231
if (mask != (val & mask )) {
233
232
val |= mask ;
234
233
sdhci_writel (host , val , SDHCI_SPRD_REG_32_BUSY_POSI );
235
234
}
235
+ } else {
236
+ if (val & mask ) {
237
+ val &= ~mask ;
238
+ sdhci_writel (host , val , SDHCI_SPRD_REG_32_BUSY_POSI );
239
+ }
236
240
}
237
241
}
238
242
You can’t perform that action at this time.
0 commit comments