Skip to contentSkip to conversation

misc: rtsx: Improve compatibility for rts5261

PATCH New [email protected] 1 participant 1 message Apr 15, 2020 Char and misc drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 misc: rtsx: Improve compatibility for rts5261

From: Rui Feng <[email protected]>

Change initial clock to improve compatibility for rts5261

---
 drivers/misc/cardreader/rts5261.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)
drivers/misc/cardreader/rts5261.c +7 -2
index bc4967a6efa1..547db5ffd3f6 100644
@@ -639,8 +639,13 @@ int rts5261_pci_switch_clock(struct rtsx_pcr *pcr, unsigned int card_clock,
 
 	if (initial_mode) {
 		/* We use 250k(around) here, in initial stage */
-		clk_divider = SD_CLK_DIVIDE_128;
-		card_clock = 30000000;
+		if (is_version(pcr, PID_5261, IC_VER_D)) {
+			clk_divider = SD_CLK_DIVIDE_256;
+			card_clock = 60000000;
+		} else {
+			clk_divider = SD_CLK_DIVIDE_128;
+			card_clock = 30000000;
+		}
 	} else {
 		clk_divider = SD_CLK_DIVIDE_0;
 	}
Signature · 1 line
2.17.1