diff options
author | Bjorn Helgaas <bhelgaas@google.com> | 2020-05-21 20:05:41 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-05-22 09:38:12 +0200 |
commit | 51876e22bf7f8f5d2b9ca7d2b3dcbfaaac2991a9 (patch) | |
tree | 27cf259d73344a7ef6e4e5e1cf3b44b7040d7841 /drivers/misc/cardreader/rts5260.c | |
parent | misc: rtsx: Remove unused pcr_ops (diff) | |
download | linux-51876e22bf7f8f5d2b9ca7d2b3dcbfaaac2991a9.tar.xz linux-51876e22bf7f8f5d2b9ca7d2b3dcbfaaac2991a9.zip |
misc: rtsx: Removed unused dev_aspm_mode
The struct rtsx_cr_option.dev_aspm_mode member is never set to anything
other than DEV_ASPM_DYNAMIC (0). Remove it and code that tests it. No
functional change intended.
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Link: https://lore.kernel.org/r/20200521180545.1159896-3-helgaas@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/misc/cardreader/rts5260.c')
-rw-r--r-- | drivers/misc/cardreader/rts5260.c | 18 |
1 files changed, 4 insertions, 14 deletions
diff --git a/drivers/misc/cardreader/rts5260.c b/drivers/misc/cardreader/rts5260.c index 711054ebad74..b4c1386382ea 100644 --- a/drivers/misc/cardreader/rts5260.c +++ b/drivers/misc/cardreader/rts5260.c @@ -572,24 +572,15 @@ static int rts5260_extra_init_hw(struct rtsx_pcr *pcr) static void rts5260_set_aspm(struct rtsx_pcr *pcr, bool enable) { - struct rtsx_cr_option *option = &pcr->option; u8 val = 0; if (pcr->aspm_enabled == enable) return; - if (option->dev_aspm_mode == DEV_ASPM_DYNAMIC) { - if (enable) - val = pcr->aspm_en; - rtsx_pci_update_cfg_byte(pcr, pcr->pcie_cap + PCI_EXP_LNKCTL, - ASPM_MASK_NEG, val); - } else if (option->dev_aspm_mode == DEV_ASPM_BACKDOOR) { - u8 mask = FORCE_ASPM_VAL_MASK | FORCE_ASPM_CTL0; - - if (!enable) - val = FORCE_ASPM_CTL0; - rtsx_pci_write_register(pcr, ASPM_FORCE_CTL, mask, val); - } + if (enable) + val = pcr->aspm_en; + rtsx_pci_update_cfg_byte(pcr, pcr->pcie_cap + PCI_EXP_LNKCTL, + ASPM_MASK_NEG, val); pcr->aspm_enabled = enable; } @@ -683,7 +674,6 @@ void rts5260_init_params(struct rtsx_pcr *pcr) option->ltr_active_latency = LTR_ACTIVE_LATENCY_DEF; option->ltr_idle_latency = LTR_IDLE_LATENCY_DEF; option->ltr_l1off_latency = LTR_L1OFF_LATENCY_DEF; - option->dev_aspm_mode = DEV_ASPM_DYNAMIC; option->l1_snooze_delay = L1_SNOOZE_DELAY_DEF; option->ltr_l1off_sspwrgate = LTR_L1OFF_SSPWRGATE_5250_DEF; option->ltr_l1off_snooze_sspwrgate = |