]> www.infradead.org Git - users/hch/misc.git/commit
PCI: cadence: Use cdns_pcie_find_*capability() to avoid hardcoding offsets
authorHans Zhang <18255117159@163.com>
Wed, 13 Aug 2025 14:45:29 +0000 (22:45 +0800)
committerBjorn Helgaas <bhelgaas@google.com>
Wed, 20 Aug 2025 20:56:19 +0000 (15:56 -0500)
commit907912c1daa7d87ec179ab35f6326e98233ae03a
treea264774aad86932fa36c5535e01a2edaa74d707b
parent18ac51ae9df925292a4d8ca6550a199924ae9e17
PCI: cadence: Use cdns_pcie_find_*capability() to avoid hardcoding offsets

The PCI capability/extended capability offsets are not guaranteed to be the
same across all SoCs integrating the Cadence PCIe IP.

Use the cdns_pcie_find_{ext}_capability() APIs to find the capabilities,
which avoids hardcoding the offsets in the driver.

Signed-off-by: Hans Zhang <18255117159@163.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Acked-by: Manivannan Sadhasivam <mani@kernel.org>
Link: https://patch.msgid.link/20250813144529.303548-7-18255117159@163.com
drivers/pci/controller/cadence/pcie-cadence-ep.c
drivers/pci/controller/cadence/pcie-cadence.h