mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-22 17:25:35 +03:00
PCI: tegra264: On EP_RESET poll for detect reset LTSSM
When Root port applies secondary bus reset(SBR) or link disable, EP_RESET interrupt is received at Endpoint. On EP_RESET poll for detect reset LTSSM state which confirms that SBR reset released or link disable is cleared. After polling perform Endpoint controller cold reset. Due to HW bug 4777981, C2 x2/x1 LTSSM state doesn't move to detect reset when SBR reset is released, instead it stays in hot reset state. In this case perform Endpoint controller cold reset after poll timeout. PCIe link still comes up in this case. Bug 4777981 Bug 4785875 Change-Id: I89402aa7c963082510170b88a1f7a4ec481162be Signed-off-by: Manikanta Maddireddy <mmaddireddy@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-t264/+/3197116 Reviewed-by: Nagarjuna Kristam <nkristam@nvidia.com> GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com> Reviewed-by: Bibek Basu <bbasu@nvidia.com>
This commit is contained in:
committed by
Jon Hunter
parent
216461effa
commit
a558aeb624
@@ -110,8 +110,7 @@
|
||||
|
||||
#define XPL_PL_LTSSM_STATE 0x1700
|
||||
#define XPL_PL_LTSSM_STATE_FULL GENMASK(7, 0)
|
||||
#define XPL_PL_LTSSM_STATE_DISABLE_TX 40
|
||||
#define XPL_PL_LTSSM_STATE_HOT_RESET 41
|
||||
#define XPL_PL_LTSSM_DETECT_QUIET 1
|
||||
|
||||
#define NV_EP_PCFG_MSI_64_HEADER 0x48
|
||||
|
||||
@@ -570,8 +569,7 @@ static irqreturn_t tegra264_pcie_ep_irq_thread(int irq, void *arg)
|
||||
int ret;
|
||||
|
||||
ret = readl_poll_timeout(pcie->xpl_base + XPL_PL_LTSSM_STATE, val,
|
||||
((val & XPL_PL_LTSSM_STATE_FULL) == XPL_PL_LTSSM_STATE_DISABLE_TX) ||
|
||||
((val & XPL_PL_LTSSM_STATE_FULL) == XPL_PL_LTSSM_STATE_HOT_RESET),
|
||||
(val & XPL_PL_LTSSM_STATE_FULL) == XPL_PL_LTSSM_DETECT_QUIET,
|
||||
PCIE_LTSSM_DELAY, PCIE_LTSSM_TIMEOUT);
|
||||
if (ret)
|
||||
dev_err(pcie->dev, "PCIe LTSSM state not in detect reset, ltssm: 0x%x\n", val);
|
||||
|
||||
Reference in New Issue
Block a user