Skip to content

Commit c18c1f1

Browse files
Rui Fenggregkh
authored andcommitted
misc: rtsx: Improve compatibility for rts5261
Change initial clock to improve compatibility for rts5261 Signed-off-by: Rui Feng <rui_feng@realsil.com.cn> Link: https://lore.kernel.org/r/1586918237-3016-1-git-send-email-rui_feng@realsil.com.cn Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 19df2f8 commit c18c1f1

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

‎drivers/misc/cardreader/rts5261.c‎

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -639,8 +639,13 @@ int rts5261_pci_switch_clock(struct rtsx_pcr *pcr, unsigned int card_clock,
639639

640640
if (initial_mode) {
641641
/* We use 250k(around) here, in initial stage */
642-
clk_divider = SD_CLK_DIVIDE_128;
643-
card_clock = 30000000;
642+
if (is_version(pcr, PID_5261, IC_VER_D)) {
643+
clk_divider = SD_CLK_DIVIDE_256;
644+
card_clock = 60000000;
645+
} else {
646+
clk_divider = SD_CLK_DIVIDE_128;
647+
card_clock = 30000000;
648+
}
644649
} else {
645650
clk_divider = SD_CLK_DIVIDE_0;
646651
}

0 commit comments

Comments
 (0)