Commit | Line | Data |
---|---|---|
b2441318 | 1 | // SPDX-License-Identifier: GPL-2.0 |
1da177e4 LT |
2 | #include <linux/kernel.h> |
3 | #include <linux/init.h> | |
4 | #include <linux/types.h> | |
5 | #include <linux/pci.h> | |
58796ce6 | 6 | #include <linux/sh_intc.h> |
1da177e4 | 7 | |
2b8ff9f2 | 8 | int pcibios_map_platform_irq(const struct pci_dev *dev, u8 slot, u8 pin) |
1da177e4 LT |
9 | { |
10 | int irq; | |
11 | ||
12 | if (dev->bus->number == 0) { | |
13 | switch (slot) { | |
58796ce6 PM |
14 | case 4: return evt2irq(0x2a0); /* eth0 */ |
15 | case 8: return evt2irq(0x2a0); /* eth1 */ | |
16 | case 6: return evt2irq(0x240); /* PCI bridge */ | |
1da177e4 | 17 | default: |
959f85f8 PM |
18 | printk(KERN_ERR "PCI: Bad IRQ mapping request " |
19 | "for slot %d\n", slot); | |
58796ce6 | 20 | return evt2irq(0x240); |
1da177e4 LT |
21 | } |
22 | } else { | |
23 | switch (pin) { | |
58796ce6 PM |
24 | case 0: irq = evt2irq(0x240); break; |
25 | case 1: irq = evt2irq(0x240); break; | |
26 | case 2: irq = evt2irq(0x240); break; | |
27 | case 3: irq = evt2irq(0x240); break; | |
28 | case 4: irq = evt2irq(0x240); break; | |
1da177e4 LT |
29 | default: irq = -1; break; |
30 | } | |
31 | } | |
32 | return irq; | |
33 | } |