Thomas Gleixner | 1a59d1b8 | 2019-05-27 08:55:05 +0200 | [diff] [blame] | 1 | // SPDX-License-Identifier: GPL-2.0-or-later |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 2 | /* |
| 3 | * fixup-mpc30x.c, The Victor MP-C303/304 specific PCI fixups. |
| 4 | * |
Yoichi Yuasa | ada8e95 | 2009-07-03 00:39:38 +0900 | [diff] [blame] | 5 | * Copyright (C) 2002,2004 Yoichi Yuasa <yuasa@linux-mips.org> |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 6 | */ |
| 7 | #include <linux/init.h> |
| 8 | #include <linux/pci.h> |
| 9 | |
| 10 | #include <asm/vr41xx/mpc30x.h> |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 11 | |
Lorenzo Pieralisi | 19a8d6b | 2017-09-19 15:50:42 +0100 | [diff] [blame] | 12 | static const int internal_func_irqs[] = { |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 13 | VRC4173_CASCADE_IRQ, |
| 14 | VRC4173_AC97_IRQ, |
| 15 | VRC4173_USB_IRQ, |
| 16 | }; |
| 17 | |
Lorenzo Pieralisi | 19a8d6b | 2017-09-19 15:50:42 +0100 | [diff] [blame] | 18 | static const int irq_tab_mpc30x[] = { |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 19 | [12] = VRC4173_PCMCIA1_IRQ, |
| 20 | [13] = VRC4173_PCMCIA2_IRQ, |
| 21 | [29] = MQ200_IRQ, |
| 22 | }; |
| 23 | |
Lorenzo Pieralisi | 19a8d6b | 2017-09-19 15:50:42 +0100 | [diff] [blame] | 24 | int pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 25 | { |
| 26 | if (slot == 30) |
| 27 | return internal_func_irqs[PCI_FUNC(dev->devfn)]; |
| 28 | |
| 29 | return irq_tab_mpc30x[slot]; |
| 30 | } |
| 31 | |
| 32 | /* Do platform specific device initialization at pci_enable_device() time */ |
| 33 | int pcibios_plat_dev_init(struct pci_dev *dev) |
| 34 | { |
| 35 | return 0; |
| 36 | } |