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

Commit 8d7347a6 authored by Gauri Joshi's avatar Gauri Joshi
Browse files

msm: ep-pcie: Clear L23 READY after enumeration



L23_READY bit in the PARF_PM_CTRL register is set coming
out of PBL. Clear it once PCIe enumerates. This will avoid
the corner case where L23_READY is sent to the host causing
the link to be disable before the EP PCIe driver has had a
chance to disable the endpoint cleanly.

Change-Id: I2159cf88c4ec5f2b38b7134e42c6a069a9738d6c
Signed-off-by: default avatarGauri Joshi <gaurjosh@codeaurora.org>
parent f627bf94
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -663,6 +663,11 @@ static void ep_pcie_core_init(struct ep_pcie_dev_t *dev, bool configured)
					TCSR_PCIE_RST_SEPARATION, BIT(5), 0);
	}

	if (!dev->enumerated) {
		EP_PCIE_DBG2(dev, "PCIe V%d: Clear L23 READY after enumeration\n", dev->rev);
		ep_pcie_write_reg_field(dev->parf, PCIE20_PARF_PM_CTRL, BIT(2), 0);
	}

	if (dev->active_config) {
		struct resource *dbi = dev->res[EP_PCIE_RES_DM_CORE].resource;
		u32 dbi_lo = dbi->start;