Thread (22 messages) 22 messages, 3 authors, 17h ago

Re: [PATCH v4 06/16] PCI: dwc: rockchip: Use cached PCIe capability offset

flat view

From: Shawn Lin <shawn.lin@rock-chips.com>
Date: 2026-10-27 12:36:52
Also in: imx, linux-amlogic, linux-arm-msm, linux-pci, linux-riscv, linux-rockchip, linux-tegra, lkml, spacemit

在 2026/10/27 星期二 20:28, Hans Zhang 写道:
rockchip_pcie_enable_l0s() is called from rockchip_pcie_host_init(),
i.e. from the .init callback, which runs after the controller clocks and
resets have been enabled. Replace the capability search with
dw_pcie_get_pcie_cap(), which reads and caches the offset at this very
point.
Reviewed-by: Shawn Lin <shawn.lin@rock-chips.com>
quoted hunk ↗ jump to hunk
Signed-off-by: Hans Zhang <18255117159@163.com>
---
  drivers/pci/controller/dwc/pcie-dw-rockchip.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/pci/controller/dwc/pcie-dw-rockchip.c b/drivers/pci/controller/dwc/pcie-dw-rockchip.c
index af26a07c0c9e..753606193855 100644
--- a/drivers/pci/controller/dwc/pcie-dw-rockchip.c
+++ b/drivers/pci/controller/dwc/pcie-dw-rockchip.c
@@ -373,7 +373,7 @@ static void rockchip_pcie_enable_l0s(struct dw_pcie *pci)
  	u32 cap, lnkcap;
  
  	/* Enable L0S capability for all SoCs */
-	cap = dw_pcie_find_capability(pci, PCI_CAP_ID_EXP);
+	cap = dw_pcie_get_pcie_cap(pci);
  	if (cap) {
  		lnkcap = dw_pcie_readl_dbi(pci, cap + PCI_EXP_LNKCAP);
  		lnkcap |= PCI_EXP_LNKCAP_ASPM_L0S;
  
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help