Re: [PATCH v3 15/16] PCI: dwc: tegra194: Use cached PCIe capability offset

[email protected] Mon, 20 Jul 2026 15:30:44 +0000
Newsgroups org.infradead.lists.linux-amlogic,dev.linux.lists.imx,org.kernel.vger.linux-pci
Message-ID <[email protected]>
> In host mode: tegra_pcie_dw_host_init() runs inside .start_link, which is
> called after dw_pcie_host_init() has cached the offset. However, the
> driver's own initialization already enables hardware, so calling
> dw_pcie_get_pcie_cap() is safe and will return the cached value.
> 
> In endpoint mode: pex_ep_event_pex_rst_deassert() runs after hardware is
> enabled (PERST# deassert). Because the core no longer caches automatically,
> we call dw_pcie_get_pcie_cap() here to cache the offset for subsequent
> accesses. The helper performs the DBI read only when hardware is ready.
> 
> Thus, the private pcie_cap_base is always valid and can still be used for
> register accesses.
> 
> Signed-off-by: Hans Zhang <[email protected]>

Sashiko has reviewed this patch and found no issues. It looks great!

-- 
Sashiko AI review ยท https://sashiko.dev/#/patchset/[email protected]?part=15


_______________________________________________
linux-amlogic mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-amlogic