Merge "msm: pcie: configure PCIe PHY registers for when PCIe link is turned off"

This commit is contained in:
Linux Build Service Account 2014-07-19 19:08:29 -07:00 committed by Gerrit - the friendly Code Review server
commit 207bb17ea1

View file

@ -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));