commit 62fe03d1dd629a98c6da86cabb2a98b85e89d516 Author: Lucas Stach Date: Wed Mar 5 14:25:51 2014 +0100 PCI: designware: use new OF interrupt mapping when possible This is the recommended method of doing the IRQ mapping. For old devicetrees we fall back to the previous practice. Signed-off-by: Lucas Stach Acked-by: Arnd Bergmann Acked-by: Jingoo Han Reviewed-by: Marek Vasut --- a/drivers/pci/host/pcie-designware.c +++ b/drivers/pci/host/pcie-designware.c @@ -17,6 +17,7 @@ #include #include #include +#include #include #include #include @@ -492,7 +493,7 @@ int __init dw_pcie_host_init(struct pcie dw_pci.nr_controllers = 1; dw_pci.private_data = (void **)&pp; - pci_common_init(&dw_pci); + pci_common_init_dev(pp->dev, &dw_pci); pci_assign_unassigned_resources(); #ifdef CONFIG_PCI_DOMAINS dw_pci.domain++; @@ -725,7 +726,7 @@ static struct pci_bus *dw_pcie_scan_bus( if (pp) { pp->root_bus_nr = sys->busnr; - bus = pci_scan_root_bus(NULL, sys->busnr, &dw_pcie_ops, + bus = pci_scan_root_bus(pp->dev, sys->busnr, &dw_pcie_ops, sys, &sys->resources); } else { bus = NULL; @@ -738,8 +739,13 @@ static struct pci_bus *dw_pcie_scan_bus( static int dw_pcie_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) { struct pcie_port *pp = sys_to_pcie(dev->bus->sysdata); + int irq; - return pp->irq; + irq = of_irq_parse_and_map_pci(dev, slot, pin); + if (!irq) + irq = pp->irq; + + return irq; } static void dw_pcie_add_bus(struct pci_bus *bus)