diff mbox

[V4,26/29] PCI: Update pcie-iproc to use IRQ deffered assignment

Message ID 1445576642-29624-27-git-send-email-matt@masarand.com (mailing list archive)
State New, archived
Delegated to: Bjorn Helgaas
Headers show

Commit Message

matt@masarand.com Oct. 23, 2015, 5:03 a.m. UTC
The pcie-iproc device is using the fixup irqs code which
will be removed later in the code to migrate to deffered irq
assignment. This patch migrates it to use the new code path and
adds support for deffered irq assignment.

Signed-off-by: Matthew Minter <matt@masarand.com>
---
 drivers/pci/host/pcie-iproc.c | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)
diff mbox

Patch

diff --git a/drivers/pci/host/pcie-iproc.c b/drivers/pci/host/pcie-iproc.c
index fe2efb1..b2e3305 100644
--- a/drivers/pci/host/pcie-iproc.c
+++ b/drivers/pci/host/pcie-iproc.c
@@ -195,6 +195,9 @@  int iproc_pcie_setup(struct iproc_pcie *pcie, struct list_head *res)
 	int ret;
 	void *sysdata;
 	struct pci_bus *bus;
+#ifdef CONFIG_ARM
+	struct pci_host_bridge *bridge;
+#endif
 
 	if (!pcie || !pcie->dev || !pcie->base)
 		return -EINVAL;
@@ -235,12 +238,13 @@  int iproc_pcie_setup(struct iproc_pcie *pcie, struct list_head *res)
 	}
 
 	iproc_pcie_enable(pcie);
-
-	pci_scan_child_bus(bus);
-	pci_assign_unassigned_bus_resources(bus);
 #ifdef CONFIG_ARM
-	pci_fixup_irqs(pci_common_swizzle, pcie->map_irq);
+	bridge = pci_find_host_bridge(bus);
+	bridge->swizzle_irq = pci_common_swizzle;
+	bridge->map_irq = pcie->map_irq;
 #endif
+	pci_scan_child_bus(bus);
+	pci_assign_unassigned_bus_resources(bus);
 	pci_bus_add_devices(bus);
 
 	return 0;