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

Commit 33164ae0 authored by Tony Truong's avatar Tony Truong
Browse files

msm: pcie: configure PCIe PHY registers for when PCIe link is


turned off

Configure PCIe PHY registers to support low power mode when PCIe
link is turned off.

Change-Id: I4cd5efe628fccf77a9d3b2acea37a57cc1ad9aa7
Signed-off-by: default avatarTony Truong <truong@codeaurora.org>
parent 9a2269f8
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -2008,6 +2008,8 @@ int msm_pcie_enable(struct msm_pcie_dev_t *dev, u32 options)
	goto out;

link_fail:
	msm_pcie_write_reg(dev->phy, PCIE_PHY_SW_RESET, 0x1);
	msm_pcie_write_reg(dev->phy, PCIE_PHY_POWER_DOWN_CONTROL, 0);
	msm_pcie_clk_deinit(dev);
clk_fail:
	msm_pcie_vreg_deinit(dev);
@@ -2041,6 +2043,9 @@ void msm_pcie_disable(struct msm_pcie_dev_t *dev, u32 options)
	gpio_set_value(dev->gpio[MSM_PCIE_GPIO_PERST].num,
				dev->gpio[MSM_PCIE_GPIO_PERST].on);

	msm_pcie_write_reg(dev->phy, PCIE_PHY_SW_RESET, 0x1);
	msm_pcie_write_reg(dev->phy, PCIE_PHY_POWER_DOWN_CONTROL, 0);

	if (options & PM_CLK) {
		msm_pcie_write_mask(dev->parf + PCIE20_PARF_PHY_CTRL, 0,
					BIT(0));