From 25d24fca15ee8723afb8b72d799758a4f62e71ba Mon Sep 17 00:00:00 2001 From: Srishti Goel Date: Thu, 10 Apr 2025 10:49:45 +0000 Subject: [PATCH] pci: tegra264: Do not toggle PRSNT# in tegra264_pcie_ep_rst_assert When EP boot up first and RP in power OFF state, default PERST# input is high due to onboard pull up. When RP is powered ON, it causes a glitch from high to low due to default pinctl settings, it is perceived as PERST# assert by Endpoint. In tegra264_pcie_ep_rst_assert() PRNST# signal is released (set high), this will cause PCIe link up failure. This WAR is initially added for RP reboot case, to handle a scenario where EP function driver still executing core_deinit as part of PERST# assert and mean while RP boot up and ready for link up again. However on Thor it is measured that core_deinit is taking only ~1.4 msec which completes before RP boots. So, it is safe to remove PRNST# release WAR in tegra264_pcie_ep_rst_assert(), this fixes link up failure when RP boot after EP. Bug 4981895 Change-Id: Ie24652a267bf3e3bc740d9c40e5b6d6671429b00 Signed-off-by: Srishti Goel Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3345684 (cherry picked from commit 8944b4a4d767a144b7204865d26b4e989ee003b6) Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3338072 Reviewed-by: mobile promotions Reviewed-by: Bitan Biswas Tested-by: mobile promotions GVS: buildbot_gerritrpt --- drivers/pci/controller/pcie-tegra264-ep.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/drivers/pci/controller/pcie-tegra264-ep.c b/drivers/pci/controller/pcie-tegra264-ep.c index cb9e96e4..7b010ba0 100644 --- a/drivers/pci/controller/pcie-tegra264-ep.c +++ b/drivers/pci/controller/pcie-tegra264-ep.c @@ -183,10 +183,6 @@ static void tegra264_pcie_ep_rst_assert(struct tegra264_pcie_ep *pcie) if (pcie->ep_state == EP_STATE_DISABLED) return; - /* Endpoint is going away, assert PRSNT# to mask EP from RP until it is ready link up */ - if (pcie->pex_prsnt_gpiod) - gpiod_set_value_cansleep(pcie->pex_prsnt_gpiod, 0); - #if defined(NV_PCI_EPC_DEINIT_NOTIFY_PRESENT) /* Linux v6.11 */ pci_epc_deinit_notify(pcie->epc); #else