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
This commit is contained in:
Hans Zhang 2025-08-13 22:45:29 +08:00 • committed by Bjorn Helgaas
commit 907912c1da
2 changed files with 22 additions and 21 deletions