1 commit 62fe03d1dd629a98c6da86cabb2a98b85e89d516
2 Author: Lucas Stach <l.stach@pengutronix.de>
3 Date: Wed Mar 5 14:25:51 2014 +0100
5 PCI: designware: use new OF interrupt mapping when possible
7 This is the recommended method of doing the IRQ
8 mapping. For old devicetrees we fall back to the
11 Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
12 Acked-by: Arnd Bergmann <arnd@arndb.de>
13 Acked-by: Jingoo Han <jg1.han@samsung.com>
14 Reviewed-by: Marek Vasut <marex@denx.de>
16 --- a/drivers/pci/host/pcie-designware.c
17 +++ b/drivers/pci/host/pcie-designware.c
19 #include <linux/module.h>
20 #include <linux/msi.h>
21 #include <linux/of_address.h>
22 +#include <linux/of_pci.h>
23 #include <linux/pci.h>
24 #include <linux/pci_regs.h>
25 #include <linux/types.h>
26 @@ -492,7 +493,7 @@ int __init dw_pcie_host_init(struct pcie
27 dw_pci.nr_controllers = 1;
28 dw_pci.private_data = (void **)&pp;
30 - pci_common_init(&dw_pci);
31 + pci_common_init_dev(pp->dev, &dw_pci);
32 pci_assign_unassigned_resources();
33 #ifdef CONFIG_PCI_DOMAINS
35 @@ -725,7 +726,7 @@ static struct pci_bus *dw_pcie_scan_bus(
38 pp->root_bus_nr = sys->busnr;
39 - bus = pci_scan_root_bus(NULL, sys->busnr, &dw_pcie_ops,
40 + bus = pci_scan_root_bus(pp->dev, sys->busnr, &dw_pcie_ops,
41 sys, &sys->resources);
44 @@ -738,8 +739,13 @@ static struct pci_bus *dw_pcie_scan_bus(
45 static int dw_pcie_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
47 struct pcie_port *pp = sys_to_pcie(dev->bus->sysdata);
51 + irq = of_irq_parse_and_map_pci(dev, slot, pin);
58 static void dw_pcie_add_bus(struct pci_bus *bus)