This source file includes following definitions.
- pcibios_map_platform_irq
1
2 #include <linux/kernel.h>
3 #include <linux/init.h>
4 #include <linux/pci.h>
5 #include <linux/types.h>
6 #include <cpu/irq.h>
7 #include "pci-sh5.h"
8
9 int pcibios_map_platform_irq(const struct pci_dev *dev, u8 slot, u8 pin)
10 {
11 int result = -1;
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32 struct slot_pin {
33 int slot;
34 int pin;
35 } path[4];
36 int i=0;
37
38 while (dev->bus->number > 0) {
39
40 slot = path[i].slot = PCI_SLOT(dev->devfn);
41 pin = path[i].pin = pci_swizzle_interrupt_pin(dev, pin);
42 dev = dev->bus->self;
43 i++;
44 if (i > 3) panic("PCI path to root bus too long!\n");
45 }
46
47 slot = PCI_SLOT(dev->devfn);
48
49
50
51
52 if ((slot < 3) || (i == 0)) {
53
54
55 result = IRQ_INTA + pci_swizzle_interrupt_pin(dev, pin) - 1;
56 } else {
57 i--;
58 slot = path[i].slot;
59 pin = path[i].pin;
60 if (slot > 0) {
61 panic("PCI expansion bus device found - not handled!\n");
62 } else {
63 if (i > 0) {
64
65 i--;
66 slot = path[i].slot;
67 pin = path[i].pin;
68
69 result = IRQ_P2INTA + (pin - 1);
70 } else {
71
72 result = -1;
73 }
74 }
75 }
76
77 return result;
78 }