diff options
author | Grant Likely <grant.likely@linaro.org> | 2013-09-19 16:44:55 -0500 |
---|---|---|
committer | Shawn Guo <shawn.guo@freescale.com> | 2014-05-16 16:19:12 +0800 |
commit | 0a60ddc194485aa16a810d80a38a2ca1c557f3b9 (patch) | |
tree | 8edda331f3ab17a09a9572c871774fdfcd31986e /drivers/pci | |
parent | 41db6e32df83b780d148b25a97b5a3cf63e8f1c1 (diff) |
ENGR00313685-7 of/irq: Create of_irq_parse_and_map_pci() to consolidate arch code.
commit 16b84e5a505c790538e534ad8dfda9c288691e40 upstream.
Several architectures open code effectively the same code block for
finding and mapping PCI irqs. This patch consolidates it down to a
single function.
Signed-off-by: Grant Likely <grant.likely@linaro.org>
Acked-by: Michal Simek <monstr@monstr.eu>
Cc: Russell King <linux@arm.linux.org.uk>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
Conflicts:
arch/arm/mach-integrator/pci_v3.c
arch/mips/pci/pci-rt3883.c
Diffstat (limited to 'drivers/pci')
-rw-r--r-- | drivers/pci/host/pci-mvebu.c | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/drivers/pci/host/pci-mvebu.c b/drivers/pci/host/pci-mvebu.c index 3636bda8db14..8500817c0ac6 100644 --- a/drivers/pci/host/pci-mvebu.c +++ b/drivers/pci/host/pci-mvebu.c @@ -636,18 +636,6 @@ static int __init mvebu_pcie_setup(int nr, struct pci_sys_data *sys) return 1; } -static int __init mvebu_pcie_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) -{ - struct of_phandle_args oirq; - int ret; - - ret = of_irq_parse_pci(dev, &oirq); - if (ret) - return ret; - - return irq_create_of_mapping(&oirq); -} - static struct pci_bus *mvebu_pcie_scan_bus(int nr, struct pci_sys_data *sys) { struct mvebu_pcie *pcie = sys_to_pcie(sys); @@ -696,7 +684,7 @@ static void __init mvebu_pcie_enable(struct mvebu_pcie *pcie) hw.private_data = (void **)&pcie; hw.setup = mvebu_pcie_setup; hw.scan = mvebu_pcie_scan_bus; - hw.map_irq = mvebu_pcie_map_irq; + hw.map_irq = of_irq_parse_and_map_pci; hw.ops = &mvebu_pcie_ops; hw.align_resource = mvebu_pcie_align_resource; |