msm: ep_pcie: unset ltssm_en bit in case of link failure

In cases where the PCIe enumeration fails after enabling LTSSM
in HLOS, we need to set ltssm_en bit properly in order for
subsequent enumeration to go through. This change unsets the
ltssm_en bit in case of link failure.

Change-Id: Ic179f1bbc88523345566c1afa78e5218c872b556
Signed-off-by: Nitesh Gupta <nitegupt@codeaurora.org>
This commit is contained in:
Nitesh Gupta 2020-10-13 17:22:32 +05:30 • committed by Gerrit - the friendly Code Review server
commit 0700b4628f

View file

@ -2003,6 +2003,11 @@ checkbme:
link_fail:
dev->power_on = false;
if (dev->phy_rev >= 3)
ep_pcie_write_mask(dev->parf + PCIE20_PARF_LTSSM, BIT(8), 0);
else
ep_pcie_write_mask(dev->elbi + PCIE20_ELBI_SYS_CTRL, BIT(0), 0);
if (!ep_pcie_debug_keep_resource)
ep_pcie_pipe_clk_deinit(dev);
pipe_clk_fail: