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