pci: msm: Disable access to MSI config as part of suspend

Some platforms do not support DRV suspend and resume.
On these platforms the access to MSI config is not
prevented as part of suspend leading to NOC faults.
Fix this by preventing the access to the same as part
of suspend, and allowing it as part of resume.

Change-Id: I435d9f1bad3843154f5a4ebff21cd8e358802817
Signed-off-by: Sriharsha Allenki <sallenki@codeaurora.org>
This commit is contained in:
Sriharsha Allenki 2021-04-29 10:35:44 +05:30
commit 8e8dbca45a

View file

@ -7486,6 +7486,8 @@ static int msm_pcie_pm_suspend(struct pci_dev *dev,
spin_unlock_irqrestore(&pcie_dev->cfg_lock,
pcie_dev->irqsave_flags);
msm_msi_config_access(dev_get_msi_domain(&pcie_dev->dev->dev), false);
writel_relaxed(BIT(4), pcie_dev->elbi + PCIE20_ELBI_SYS_CTRL);
wmb(); /* ensure changes propagated to the hardware */
@ -7619,6 +7621,8 @@ static int msm_pcie_pm_resume(struct pci_dev *dev,
pcie_dev->rc_idx);
}
msm_msi_config_access(dev_get_msi_domain(&pcie_dev->dev->dev), true);
PCIE_DBG(pcie_dev, "RC%d: exit\n", pcie_dev->rc_idx);
return ret;