Skip to content

Commit acd46d5

Browse files
Vidya Sagarbjorn-helgaas
authored andcommitted
PCI: tegra194: Enable hardware hot reset mode in Endpoint mode
When PCIe link goes down, hardware can retrain the link and try to link up. To enable this feature, program the APPL_CTRL register with hardware hot reset with immediate LTSSM enable mode when the controller is operating in endpoint mode. Signed-off-by: Vidya Sagar <vidyas@nvidia.com> Signed-off-by: Manikanta Maddireddy <mmaddireddy@nvidia.com> [mani: commit log] Signed-off-by: Manivannan Sadhasivam <mani@kernel.org> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Tested-by: Jon Hunter <jonathanh@nvidia.com> Reviewed-by: Jon Hunter <jonathanh@nvidia.com> Reviewed-by: Vidya Sagar <vidyas@nvidia.com> Link: https://patch.msgid.link/20260324191000.1095768-6-mmaddireddy@nvidia.com
1 parent 66861c5 commit acd46d5

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

drivers/pci/controller/dwc/pcie-tegra194.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1796,6 +1796,8 @@ static void pex_ep_event_pex_rst_deassert(struct tegra_pcie_dw *pcie)
17961796
val = appl_readl(pcie, APPL_CTRL);
17971797
val |= APPL_CTRL_SYS_PRE_DET_STATE;
17981798
val |= APPL_CTRL_HW_HOT_RST_EN;
1799+
val &= ~(APPL_CTRL_HW_HOT_RST_MODE_MASK << APPL_CTRL_HW_HOT_RST_MODE_SHIFT);
1800+
val |= (APPL_CTRL_HW_HOT_RST_MODE_IMDT_RST_LTSSM_EN << APPL_CTRL_HW_HOT_RST_MODE_SHIFT);
17991801
appl_writel(pcie, val, APPL_CTRL);
18001802

18011803
val = appl_readl(pcie, APPL_CFG_MISC);

0 commit comments

Comments
 (0)