]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
PCI: cadence-hpa: Add post-link delay
authorHans Zhang <18255117159@163.com>
Mon, 18 May 2026 00:42:42 +0000 (08:42 +0800)
committerBjorn Helgaas <bhelgaas@google.com>
Tue, 23 Jun 2026 19:33:48 +0000 (14:33 -0500)
commit57d3400df05222ee8ab32223150df2472a471d02
tree2cadcb5a97fa6096eb1df074bbacf7cb1f9001b2
parent869317b95fd735684057666a65dd8ef95d4bd669
PCI: cadence-hpa: Add post-link delay

The Cadence HPA (High Performance Architecture IP) specific link setup
function cdns_pcie_hpa_host_link_setup() waits for the link to come up
but does not implement the required 100 ms delay after link training
completes for speeds > 5.0 GT/s (PCIe r6.0 sec 6.6.1).

Add a call to pci_host_common_link_train_delay() immediately after the
link is confirmed to be up, using the max_link_speed field. Also, in the
HPA host setup function, read the device tree property "max-link-speed"
to initialize max_link_speed if not already set by a glue driver.

This ensures compliance for HPA-based platforms.

Signed-off-by: Hans Zhang <18255117159@163.com>
Signed-off-by: Manivannan Sadhasivam <mani@kernel.org>
[bhelgaas: driver tag "cadence: HPA:" -> "cadence-hpa:"]
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Link: https://patch.msgid.link/20260518004246.1384532-4-18255117159@163.com
drivers/pci/controller/cadence/pcie-cadence-host-hpa.c