summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwwang <wei_wang@realsil.com.cn>2011-03-15 16:22:16 +0800
committerGreg Kroah-Hartman <gregkh@suse.de>2011-04-04 21:33:27 -0700
commitea4fca42b9ba61c68f77a783fcae13368a71b6bc (patch)
tree43d1609adb69bb41b0e7ab04002451530ba6d8df
parente0007c0c87f02b357a4f97f792c96f1264d09ea9 (diff)
staging: rts_pstor: set lun_mode in a different place
In sony notebook, card reader will be configured as two-lun mode through EFUSE. In this situation, MS card can't be recognized properly because driver does only support single-lun mode in default. In this patch, lun_mode is set in a different place, so driver can detect the EFUSE configuation automatically. Signed-off-by: wwang <wei_wang@realsil.com.cn> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r--drivers/staging/rts_pstor/rtsx_chip.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/drivers/staging/rts_pstor/rtsx_chip.c b/drivers/staging/rts_pstor/rtsx_chip.c
index f443d97a56f..d2f1c715a68 100644
--- a/drivers/staging/rts_pstor/rtsx_chip.c
+++ b/drivers/staging/rts_pstor/rtsx_chip.c
@@ -684,6 +684,11 @@ static int rts5209_init(struct rtsx_chip *chip)
RTSX_DEBUGP("dw in 0x724: 0x%x\n", lval);
val = (u8)lval;
if (!(val & 0x80)) {
+ if (val & 0x08)
+ chip->lun_mode = DEFAULT_SINGLE;
+ else
+ chip->lun_mode = SD_MS_2LUN;
+
if (val & 0x04) {
SET_SDIO_EXIST(chip);
} else {
@@ -705,12 +710,6 @@ static int rts5209_init(struct rtsx_chip *chip)
chip->aspm_l0s_l1_en = (val >> 5) & 0x03;
- if (val & 0x08) {
- chip->lun_mode = DEFAULT_SINGLE;
- } else {
- chip->lun_mode = SD_MS_2LUN;
- }
-
val = (u8)(lval >> 8);
clk = (val >> 5) & 0x07;