Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0700b462 authored by Nitesh Gupta's avatar Nitesh Gupta Committed by Gerrit - the friendly Code Review server
Browse files

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: default avatarNitesh Gupta <nitegupt@codeaurora.org>
parent 521fadd2
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -2003,6 +2003,11 @@ int ep_pcie_core_enable_endpoint(enum ep_pcie_options opt)

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: