aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci/controller/dwc/pcie-qcom-common.c
diff options
context:
space:
mode:
authorWilfred Mallawa <[email protected]>2025-06-13 10:19:09 +0000
committerBjorn Helgaas <[email protected]>2025-06-19 15:57:31 +0000
commitc0b93754547dde16c8370b8fdad5f396e7786647 (patch)
treec7e056a8aa67bcd08c8101555453b17eaeb1846a /drivers/pci/controller/dwc/pcie-qcom-common.c
parentLinux 6.16-rc1 (diff)
downloadkernel-c0b93754547dde16c8370b8fdad5f396e7786647.tar.gz
kernel-c0b93754547dde16c8370b8fdad5f396e7786647.zip
PCI: dw-rockchip: Delay link training after hot reset in EP mode
RK3588 TRM, section "11.6.1.3.3 Hot Reset and Link-Down Reset" states that: If you want to delay link re-establishment (after reset) so that you can reprogram some registers through DBI, you must set app_ltssm_enable =0 immediately after core_rst_n as shown in above. This can be achieved by enable the app_dly2_en, and end-up the delay by assert app_dly2_done. I.e. setting app_dly2_en will automatically deassert app_ltssm_enable on a hot reset, and setting app_dly2_done will re-assert app_ltssm_enable, re-enabling link training. When receiving a hot reset/link-down IRQ when running in EP mode, we will call dw_pcie_ep_linkdown(), which may update registers through DBI. Unless link training is inhibited, these register updates race with the link training. To avoid the race, set PCIE_LTSSM_APP_DLY2_EN so the controller never automatically trains the link after a link-down or hot reset interrupt. That way any DBI updates done in the dw_pcie_ep_linkdown() path will happen while the link is still down. Then allow link training by setting PCIE_LTSSM_APP_DLY2_DONE Co-developed-by: Niklas Cassel <[email protected]> Signed-off-by: Wilfred Mallawa <[email protected]> Signed-off-by: Niklas Cassel <[email protected]> Signed-off-by: Manivannan Sadhasivam <[email protected]> [bhelgaas: commit log] Signed-off-by: Bjorn Helgaas <[email protected]> Link: https://patch.msgid.link/[email protected]
Diffstat (limited to 'drivers/pci/controller/dwc/pcie-qcom-common.c')
0 files changed, 0 insertions, 0 deletions