misc: rtsx: Fixed rts5260 power saving parameter and sd glitch
this patch fixes rts5260 power saving parameter make power saving function work on L1.1, L1.2 Signed-off-by: RickyWu <ricky_wu@realtek.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
60d4885710
commit
24f1bc280b
@ -451,6 +451,7 @@ static void rts5260_pwr_saving_setting(struct rtsx_pcr *pcr)
|
|||||||
lss_l1_2 = rtsx_check_dev_flag(pcr, ASPM_L1_2_EN)
|
lss_l1_2 = rtsx_check_dev_flag(pcr, ASPM_L1_2_EN)
|
||||||
| rtsx_check_dev_flag(pcr, PM_L1_2_EN);
|
| rtsx_check_dev_flag(pcr, PM_L1_2_EN);
|
||||||
|
|
||||||
|
rtsx_pci_write_register(pcr, ASPM_FORCE_CTL, 0xFF, 0);
|
||||||
if (lss_l1_2) {
|
if (lss_l1_2) {
|
||||||
pcr_dbg(pcr, "Set parameters for L1.2.");
|
pcr_dbg(pcr, "Set parameters for L1.2.");
|
||||||
rtsx_pci_write_register(pcr, PWR_GLOBAL_CTRL,
|
rtsx_pci_write_register(pcr, PWR_GLOBAL_CTRL,
|
||||||
@ -573,10 +574,10 @@ static int rts5260_extra_init_hw(struct rtsx_pcr *pcr)
|
|||||||
* to drive low, and we forcibly request clock.
|
* to drive low, and we forcibly request clock.
|
||||||
*/
|
*/
|
||||||
if (option->force_clkreq_0)
|
if (option->force_clkreq_0)
|
||||||
rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, PETXCFG,
|
rtsx_pci_write_register(pcr, PETXCFG,
|
||||||
FORCE_CLKREQ_DELINK_MASK, FORCE_CLKREQ_LOW);
|
FORCE_CLKREQ_DELINK_MASK, FORCE_CLKREQ_LOW);
|
||||||
else
|
else
|
||||||
rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, PETXCFG,
|
rtsx_pci_write_register(pcr, PETXCFG,
|
||||||
FORCE_CLKREQ_DELINK_MASK, FORCE_CLKREQ_HIGH);
|
FORCE_CLKREQ_DELINK_MASK, FORCE_CLKREQ_HIGH);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
@ -704,7 +705,7 @@ void rts5260_init_params(struct rtsx_pcr *pcr)
|
|||||||
option->ocp_en = 1;
|
option->ocp_en = 1;
|
||||||
if (option->ocp_en)
|
if (option->ocp_en)
|
||||||
hw_param->interrupt_en |= SD_OC_INT_EN;
|
hw_param->interrupt_en |= SD_OC_INT_EN;
|
||||||
hw_param->ocp_glitch = SDVIO_OCP_GLITCH_800U | SDVIO_OCP_GLITCH_800U;
|
hw_param->ocp_glitch = SD_OCP_GLITCH_100U | SDVIO_OCP_GLITCH_800U;
|
||||||
option->sd_400mA_ocp_thd = RTS5260_DVCC_OCP_THD_550;
|
option->sd_400mA_ocp_thd = RTS5260_DVCC_OCP_THD_550;
|
||||||
option->sd_800mA_ocp_thd = RTS5260_DVCC_OCP_THD_970;
|
option->sd_800mA_ocp_thd = RTS5260_DVCC_OCP_THD_970;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user