PCI: xilinx-nwl: Move to struct pci_host_bridge IRQ mapping functions
authorLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Wed, 28 Jun 2017 20:14:11 +0000 (15:14 -0500)
committerBjorn Helgaas <bhelgaas@google.com>
Sun, 2 Jul 2017 21:51:20 +0000 (16:51 -0500)
struct pci_host_bridge gained hooks to map/swizzle IRQs, so that the IRQ
mapping can be done automatically by PCI core code through the
pci_assign_irq() function instead of resorting to arch-specific
implementation callbacks to carry out the same task which force PCI host
bridge drivers implementation to implement per-arch kludges to carry out a
task that is inherently architecture agnostic.

Add map/swizzle IRQs hooks to the xilinx-nwl PCI host driver to move the
IRQ allocation into core code and stop relying on arch-specific callbacks.

Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Cc: Bharat Kumar Gogada <bharat.kumar.gogada@xilinx.com>
drivers/pci/host/pcie-xilinx-nwl.c

index e8a589431008ccc4a3cfed86fedecf96f5e65c6b..d1f7e4ca5a5a38de3bb4729a1db89402e3a64d1b 100644 (file)
@@ -838,6 +838,8 @@ static int nwl_pcie_probe(struct platform_device *pdev)
        bridge->sysdata = pcie;
        bridge->busnr = pcie->root_busno;
        bridge->ops = &nwl_pcie_ops;
+       bridge->map_irq = of_irq_parse_and_map_pci;
+       bridge->swizzle_irq = pci_common_swizzle;
 
        if (IS_ENABLED(CONFIG_PCI_MSI)) {
                err = nwl_pcie_enable_msi(pcie);