[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200721212336.1159079-2-helgaas@kernel.org>
Date: Tue, 21 Jul 2020 16:23:32 -0500
From: Bjorn Helgaas <helgaas@...nel.org>
To: Ricky Wu <ricky_wu@...ltek.com>
Cc: Arnd Bergmann <arnd@...db.de>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Ulf Hansson <ulf.hansson@...aro.org>,
Rui Feng <rui_feng@...lsil.com.cn>, Klaus Doth <kdlnx@...h.eu>,
Linus Walleij <linus.walleij@...aro.org>,
Rui Miguel Silva <rmfrfs@...il.com>,
Puranjay Mohan <puranjay12@...il.com>,
linux-kernel@...r.kernel.org, linux-mmc@...r.kernel.org,
Bjorn Helgaas <bhelgaas@...gle.com>
Subject: [PATCH 1/5] misc: rtsx: Use pcie_capability_clear_and_set_word() for PCI_EXP_LNKCTL
From: Bjorn Helgaas <bhelgaas@...gle.com>
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@...gle.com>
---
drivers/misc/cardreader/rtsx_pcr.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/misc/cardreader/rtsx_pcr.c b/drivers/misc/cardreader/rtsx_pcr.c
index 0d5928bc1b6d..6a4d6c8f4e71 100644
--- a/drivers/misc/cardreader/rtsx_pcr.c
+++ b/drivers/misc/cardreader/rtsx_pcr.c
@@ -1231,6 +1231,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;
pcr->pcie_cap = pci_find_capability(pcr->pci, PCI_CAP_ID_EXP);
@@ -1324,7 +1325,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);
--
2.25.1
Powered by blists - more mailing lists