aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/drivers/pci/controller/mobiveil/pcie-mobiveil-host.c
diff options
context:
space:
mode:
authorHou Zhiqiang <Zhiqiang.Hou@nxp.com>2020-02-13 12:06:36 +0800
committerLorenzo Pieralisi <lorenzo.pieralisi@arm.com>2020-02-21 11:53:22 +0000
commited620e96541f3248ad7cfe069f98d43177ae0435 (patch)
tree583be3a016a826584955a0544514098d5407f85d /drivers/pci/controller/mobiveil/pcie-mobiveil-host.c
parentPCI: mobiveil: Modularize the Mobiveil PCIe Host Bridge IP driver (diff)
downloadwireguard-linux-ed620e96541f3248ad7cfe069f98d43177ae0435.tar.xz
wireguard-linux-ed620e96541f3248ad7cfe069f98d43177ae0435.zip
PCI: mobiveil: Add callback function for interrupt initialization
The Mobiveil GPEX internal MSI/INTx controller is not implemented in all platforms in which the Mobiveil GPEX is integrated. Allow platforms to implement their specific interrupt initialization. Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com> Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com> Reviewed-by: Andrew Murray <amurray@thegoodpenguin.co.uk>
Diffstat (limited to 'drivers/pci/controller/mobiveil/pcie-mobiveil-host.c')
-rw-r--r--drivers/pci/controller/mobiveil/pcie-mobiveil-host.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/drivers/pci/controller/mobiveil/pcie-mobiveil-host.c b/drivers/pci/controller/mobiveil/pcie-mobiveil-host.c
index 432b019a4fcf..8d12682e8346 100644
--- a/drivers/pci/controller/mobiveil/pcie-mobiveil-host.c
+++ b/drivers/pci/controller/mobiveil/pcie-mobiveil-host.c
@@ -499,7 +499,7 @@ static int mobiveil_pcie_init_irq_domain(struct mobiveil_pcie *pcie)
return 0;
}
-static int mobiveil_pcie_interrupt_init(struct mobiveil_pcie *pcie)
+static int mobiveil_pcie_integrated_interrupt_init(struct mobiveil_pcie *pcie)
{
struct platform_device *pdev = pcie->pdev;
struct device *dev = &pdev->dev;
@@ -539,6 +539,16 @@ static int mobiveil_pcie_interrupt_init(struct mobiveil_pcie *pcie)
return 0;
}
+static int mobiveil_pcie_interrupt_init(struct mobiveil_pcie *pcie)
+{
+ struct mobiveil_root_port *rp = &pcie->rp;
+
+ if (rp->ops->interrupt_init)
+ return rp->ops->interrupt_init(pcie);
+
+ return mobiveil_pcie_integrated_interrupt_init(pcie);
+}
+
int mobiveil_pcie_host_probe(struct mobiveil_pcie *pcie)
{
struct mobiveil_root_port *rp = &pcie->rp;