Skip to content

Commit

Permalink
PCI: xgene: Move to struct pci_host_bridge IRQ mapping functions
Browse files Browse the repository at this point in the history
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 xgene PCI host driver to move the IRQ
allocation into core code and stop relying on arch-specific callbacks.

Tested-by: Khuong Dinh <kdinh@apm.com>	# with e1000e
Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Cc: Tanmay Inamdar <tinamdar@apm.com>
  • Loading branch information
Lorenzo Pieralisi authored and Bjorn Helgaas committed Jul 2, 2017
1 parent 6ab3809 commit c62e98b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/pci/host/pci-xgene.c
Original file line number Diff line number Diff line change
Expand Up @@ -678,6 +678,8 @@ static int xgene_pcie_probe_bridge(struct platform_device *pdev)
bridge->sysdata = port;
bridge->busnr = 0;
bridge->ops = &xgene_pcie_ops;
bridge->map_irq = of_irq_parse_and_map_pci;
bridge->swizzle_irq = pci_common_swizzle;

ret = pci_scan_root_bus_bridge(bridge);
if (ret < 0)
Expand Down

0 comments on commit c62e98b

Please sign in to comment.