Re: [v4 4/4] PCI: cadence: Use cdns_pcie_find_*capability to find capability offset instead of hardcore
From: Manivannan Sadhasivam
Date: Fri Mar 21 2025 - 09:19:12 EST
On Fri, Mar 21, 2025 at 06:17:10PM +0800, Hans Zhang wrote:
> The offset address of capability or extended capability designed by
> different SOC design companies may not be the same. Therefore, a flexible
> public API is required to find the offset address of a capability or
> extended capability in the configuration space.
>
The PCIe capability/extended capability offsets are not guaranteed to be
the same across all SoCs integrating the Cadence PCIe IP. Hence, use the
cdns_pcie_find_{ext}_capability() APIs for finding them.
This avoids hardcoding the offsets in the driver.
- Mani
--
மணிவண்ணன் சதாசிவம்