mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-03 04:42:13 +00:00
staging: rts_pstor: MSXC card power class
1, Initialize chip->ms_power_class_en in rtsx_init_options; 2, In reset_ms_pro, set different initial value of change_power_class according to chip->ms_power_class_en. Signed-off-by: wwang <wei_wang@realsil.com.cn> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
parent
7c31607e16
commit
9fe341e834
2 changed files with 10 additions and 5 deletions
|
@ -1099,7 +1099,14 @@ static int reset_ms_pro(struct rtsx_chip *chip)
|
||||||
struct ms_info *ms_card = &(chip->ms_card);
|
struct ms_info *ms_card = &(chip->ms_card);
|
||||||
int retval;
|
int retval;
|
||||||
#ifdef XC_POWERCLASS
|
#ifdef XC_POWERCLASS
|
||||||
u8 change_power_class = 2;
|
u8 change_power_class;
|
||||||
|
|
||||||
|
if (chip->ms_power_class_en & 0x02)
|
||||||
|
change_power_class = 2;
|
||||||
|
else if (chip->ms_power_class_en & 0x01)
|
||||||
|
change_power_class = 1;
|
||||||
|
else
|
||||||
|
change_power_class = 0;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef XC_POWERCLASS
|
#ifdef XC_POWERCLASS
|
||||||
|
@ -1128,10 +1135,7 @@ Retry:
|
||||||
}
|
}
|
||||||
|
|
||||||
if (change_power_class && CHK_MSXC(ms_card)) {
|
if (change_power_class && CHK_MSXC(ms_card)) {
|
||||||
u8 power_class_en = 0x03;
|
u8 power_class_en = chip->ms_power_class_en;
|
||||||
|
|
||||||
if (CHECK_PID(chip, 0x5209))
|
|
||||||
power_class_en = chip->ms_power_class_en;
|
|
||||||
|
|
||||||
RTSX_DEBUGP("power_class_en = 0x%x\n", power_class_en);
|
RTSX_DEBUGP("power_class_en = 0x%x\n", power_class_en);
|
||||||
RTSX_DEBUGP("change_power_class = %d\n", change_power_class);
|
RTSX_DEBUGP("change_power_class = %d\n", change_power_class);
|
||||||
|
|
|
@ -850,6 +850,7 @@ static void rtsx_init_options(struct rtsx_chip *chip)
|
||||||
chip->sd_default_rx_phase = 15;
|
chip->sd_default_rx_phase = 15;
|
||||||
chip->pmos_pwr_on_interval = 200;
|
chip->pmos_pwr_on_interval = 200;
|
||||||
chip->sd_voltage_switch_delay = 1000;
|
chip->sd_voltage_switch_delay = 1000;
|
||||||
|
chip->ms_power_class_en = 3;
|
||||||
|
|
||||||
chip->sd_400mA_ocp_thd = 1;
|
chip->sd_400mA_ocp_thd = 1;
|
||||||
chip->sd_800mA_ocp_thd = 5;
|
chip->sd_800mA_ocp_thd = 5;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue