Merge tag 'trace-v4.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt...
[linux/fpc-iii.git] / arch / mips / pci / fixup-lantiq.c
blob81530a13b34990a38d159ae248aa0a2d453bf332
1 /*
2 * This program is free software; you can redistribute it and/or modify it
3 * under the terms of the GNU General Public License version 2 as published
4 * by the Free Software Foundation.
6 * Copyright (C) 2012 John Crispin <john@phrozen.org>
7 */
9 #include <linux/of_irq.h>
10 #include <linux/of_pci.h>
12 int (*ltq_pci_plat_arch_init)(struct pci_dev *dev) = NULL;
13 int (*ltq_pci_plat_dev_init)(struct pci_dev *dev) = NULL;
15 int pcibios_plat_dev_init(struct pci_dev *dev)
17 if (ltq_pci_plat_arch_init)
18 return ltq_pci_plat_arch_init(dev);
20 if (ltq_pci_plat_dev_init)
21 return ltq_pci_plat_dev_init(dev);
23 return 0;
26 int pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
28 return of_irq_parse_and_map_pci(dev, slot, pin);