aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/misc/cardreader
diff options
context:
space:
mode:
authorBjorn Helgaas <bhelgaas@google.com>2020-07-21 16:23:32 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-07-22 13:21:51 +0200
commitff36dc6e9654ae511039300b102e8f3d30814859 (patch)
tree3f7e9da9b01e1e89a57029e5d27f8a657c0ced82 /drivers/misc/cardreader
parentcoresight: etm4x: Fix save/restore during cpu idle (diff)
downloadlinux-dev-ff36dc6e9654ae511039300b102e8f3d30814859.tar.xz
linux-dev-ff36dc6e9654ae511039300b102e8f3d30814859.zip
misc: rtsx: Use pcie_capability_clear_and_set_word() for PCI_EXP_LNKCTL
Instead of using the driver-specific rtsx_pci_write_config_byte() to update the PCIe Link Control Register, use pcie_capability_write_word() like the rest of the kernel does. This makes it easier to maintain ASPM across the PCI core and drivers. No functional change intended. I missed this when doing 3d1e7aa80d1c ("misc: rtsx: Use pcie_capability_clear_and_set_word() for PCI_EXP_LNKCTL"). Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Acked-by: Arnd Bergmann <arnd@arndb.de> Link: https://lore.kernel.org/r/20200721212336.1159079-2-helgaas@kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/misc/cardreader')
-rw-r--r--drivers/misc/cardreader/rtsx_pcr.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/misc/cardreader/rtsx_pcr.c b/drivers/misc/cardreader/rtsx_pcr.c
index 5ff690d2e9a9..6d76929f31f5 100644
--- a/drivers/misc/cardreader/rtsx_pcr.c
+++ b/drivers/misc/cardreader/rtsx_pcr.c
@@ -1246,6 +1246,7 @@ int rtsx_ms_power_off_card3v3(struct rtsx_pcr *pcr)
static int rtsx_pci_init_hw(struct rtsx_pcr *pcr)
{
+ struct pci_dev *pdev = pcr->pci;
int err;
if (PCI_PID(pcr) == PID_5228)
@@ -1347,7 +1348,8 @@ static int rtsx_pci_init_hw(struct rtsx_pcr *pcr)
rtsx_pci_init_ocp(pcr);
/* Enable clk_request_n to enable clock power management */
- rtsx_pci_write_config_byte(pcr, pcr->pcie_cap + PCI_EXP_LNKCTL + 1, 1);
+ pcie_capability_write_word(pdev, PCI_EXP_LNKCTL,
+ PCI_EXP_LNKCTL_CLKREQ_EN);
/* Enter L1 when host tx idle */
rtsx_pci_write_config_byte(pcr, 0x70F, 0x5B);