David Brazdil | 0f672f6 | 2019-12-10 10:32:29 +0000 | [diff] [blame^] | 1 | // SPDX-License-Identifier: GPL-2.0-only |
Andrew Scull | b4b6d4a | 2019-01-02 15:54:55 +0000 | [diff] [blame] | 2 | /* |
Andrew Scull | b4b6d4a | 2019-01-02 15:54:55 +0000 | [diff] [blame] | 3 | * |
| 4 | * Copyright (C) 2012 John Crispin <john@phrozen.org> |
| 5 | */ |
| 6 | |
| 7 | #include <linux/of_irq.h> |
| 8 | #include <linux/of_pci.h> |
| 9 | |
| 10 | int (*ltq_pci_plat_arch_init)(struct pci_dev *dev) = NULL; |
| 11 | int (*ltq_pci_plat_dev_init)(struct pci_dev *dev) = NULL; |
| 12 | |
| 13 | int pcibios_plat_dev_init(struct pci_dev *dev) |
| 14 | { |
| 15 | if (ltq_pci_plat_arch_init) |
| 16 | return ltq_pci_plat_arch_init(dev); |
| 17 | |
| 18 | if (ltq_pci_plat_dev_init) |
| 19 | return ltq_pci_plat_dev_init(dev); |
| 20 | |
| 21 | return 0; |
| 22 | } |
| 23 | |
| 24 | int pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) |
| 25 | { |
| 26 | return of_irq_parse_and_map_pci(dev, slot, pin); |
| 27 | } |