summaryrefslogtreecommitdiff
path: root/include/linux/rtsx_pci.h
diff options
context:
space:
mode:
authorBjorn Helgaas <bhelgaas@google.com>2020-05-21 13:05:43 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-05-22 09:38:13 +0200
commit3d1e7aa80d1c0e7ce8313f21c1e9c14a12d3ba48 (patch)
tree41036f3d6a12f55a2b15ac150fbb4df0f5f5ae17 /include/linux/rtsx_pci.h
parent9ae577047e5bae5f2adf41eb3f02a1e3d75134e1 (diff)
misc: rtsx: Use pcie_capability_clear_and_set_word() for PCI_EXP_LNKCTL
Instead of using the driver-specific rtsx_pci_update_cfg_byte() to update the PCIe Link Control Register, use pcie_capability_clear_and_set_word() like the rest of the kernel does. This makes it easier to maintain ASPM across the PCI core and drivers. Remove the now-unused rtsx_pci_update_cfg_byte() and ASPM_MASK_NEG definitions. No functional change intended. Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Link: https://lore.kernel.org/r/20200521180545.1159896-5-helgaas@kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux/rtsx_pci.h')
-rw-r--r--include/linux/rtsx_pci.h12
1 files changed, 0 insertions, 12 deletions
diff --git a/include/linux/rtsx_pci.h b/include/linux/rtsx_pci.h
index a75132a0cf8f..e8780d4e4636 100644
--- a/include/linux/rtsx_pci.h
+++ b/include/linux/rtsx_pci.h
@@ -1307,18 +1307,6 @@ static inline u8 *rtsx_pci_get_cmd_data(struct rtsx_pcr *pcr)
return (u8 *)(pcr->host_cmds_ptr);
}
-static inline int rtsx_pci_update_cfg_byte(struct rtsx_pcr *pcr, int addr,
- u8 mask, u8 append)
-{
- int err;
- u8 val;
-
- err = pci_read_config_byte(pcr->pci, addr, &val);
- if (err < 0)
- return err;
- return pci_write_config_byte(pcr->pci, addr, (val & mask) | append);
-}
-
static inline void rtsx_pci_write_be32(struct rtsx_pcr *pcr, u16 reg, u32 val)
{
rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, reg, 0xFF, val >> 24);