This source file includes following definitions.
- rbtx4938_pci_map_irq
1
2
3
4
5
6
7
8
9
10
11
12 #include <linux/types.h>
13 #include <asm/txx9/pci.h>
14 #include <asm/txx9/rbtx4938.h>
15
16 int rbtx4938_pci_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
17 {
18 int irq = tx4938_pcic1_map_irq(dev, slot);
19
20 if (irq >= 0)
21 return irq;
22 irq = pin;
23
24 irq--;
25 if (slot == TX4927_PCIC_IDSEL_AD_TO_SLOT(23)) {
26
27
28 irq = (irq + 0 + slot) % 4;
29 } else {
30
31 if (txx9_pci_option & TXX9_PCI_OPT_PICMG)
32 irq = (irq + 33 - slot) % 4;
33 else
34 irq = (irq + 3 + slot) % 4;
35 }
36 irq++;
37
38 switch (irq) {
39 case 1:
40 irq = RBTX4938_IRQ_IOC_PCIA;
41 break;
42 case 2:
43 irq = RBTX4938_IRQ_IOC_PCIB;
44 break;
45 case 3:
46 irq = RBTX4938_IRQ_IOC_PCIC;
47 break;
48 case 4:
49 irq = RBTX4938_IRQ_IOC_PCID;
50 break;
51 }
52 return irq;
53 }