提交 294353d9 编写于 作者: J Jisheng Zhang 提交者: Lorenzo Pieralisi

PCI: dwc: Move dw_pcie_msi_init() to dw_pcie_setup_rc()

If the host which makes use of IP's integrated MSI Receiver losts
power during suspend, we need to reinit the RC and MSI Receiver in
resume. But after we move dw_pcie_msi_init() into the core, we have no
API to do so. Usually the dwc users need to call dw_pcie_setup_rc() to
reinit the RC, we can solve this problem by moving dw_pcie_msi_init()
to dw_pcie_setup_rc().

Link: https://lore.kernel.org/r/20210325152604.6e79deba@xhacker.debianSigned-off-by: NJisheng Zhang <Jisheng.Zhang@synaptics.com>
Signed-off-by: NLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Reviewed-by: NRob Herring <robh@kernel.org>
上级 3d0b2a3a
...@@ -400,7 +400,6 @@ int dw_pcie_host_init(struct pcie_port *pp) ...@@ -400,7 +400,6 @@ int dw_pcie_host_init(struct pcie_port *pp)
} }
dw_pcie_setup_rc(pp); dw_pcie_setup_rc(pp);
dw_pcie_msi_init(pp);
if (!dw_pcie_link_up(pci) && pci->ops && pci->ops->start_link) { if (!dw_pcie_link_up(pci) && pci->ops && pci->ops->start_link) {
ret = pci->ops->start_link(pci); ret = pci->ops->start_link(pci);
...@@ -551,6 +550,8 @@ void dw_pcie_setup_rc(struct pcie_port *pp) ...@@ -551,6 +550,8 @@ void dw_pcie_setup_rc(struct pcie_port *pp)
} }
} }
dw_pcie_msi_init(pp);
/* Setup RC BARs */ /* Setup RC BARs */
dw_pcie_writel_dbi(pci, PCI_BASE_ADDRESS_0, 0x00000004); dw_pcie_writel_dbi(pci, PCI_BASE_ADDRESS_0, 0x00000004);
dw_pcie_writel_dbi(pci, PCI_BASE_ADDRESS_1, 0x00000000); dw_pcie_writel_dbi(pci, PCI_BASE_ADDRESS_1, 0x00000000);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册