Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[MIPS] SNI PCIT CPLUS: workaround for b0rked irq wiring of onboard PCI bus 1

Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

authored by

Thomas Bogendoerfer and committed by
Ralf Baechle
fcee3faf f6771dbb

+22 -1
+22 -1
arch/mips/pci/fixup-sni.c
··· 113 113 { 0, INTA, INTB, INTC, INTD }, /* Slot 5 */ 114 114 }; 115 115 116 + static char irq_tab_pcit_cplus[13][5] __initdata = { 117 + /* INTA INTB INTC INTD */ 118 + { 0, 0, 0, 0, 0 }, /* HOST bridge */ 119 + { 0, INTB, INTC, INTD, INTA }, /* PCI Slot 9 */ 120 + { 0, 0, 0, 0, 0 }, /* PCI-EISA */ 121 + { 0, 0, 0, 0, 0 }, /* Unused */ 122 + { 0, INTA, INTB, INTC, INTD }, /* PCI-PCI bridge */ 123 + { 0, INTB, INTC, INTD, INTA }, /* fixup */ 124 + }; 125 + 116 126 static inline int is_rm300_revd(void) 117 127 { 118 128 unsigned char csmsr = *(volatile unsigned char *)PCIMT_CSMSR; ··· 133 123 int __init pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) 134 124 { 135 125 switch (sni_brd_type) { 136 - case SNI_BRD_PCI_TOWER: 137 126 case SNI_BRD_PCI_TOWER_CPLUS: 127 + if (slot == 4) { 128 + /* 129 + * SNI messed up interrupt wiring for onboard 130 + * PCI bus 1; we need to fix this up here 131 + */ 132 + while (dev && dev->bus->number != 1) 133 + dev = dev->bus->self; 134 + if (dev && dev->devfn >= PCI_DEVFN(4, 0)) 135 + slot = 5; 136 + } 137 + return irq_tab_pcit_cplus[slot][pin]; 138 + case SNI_BRD_PCI_TOWER: 138 139 return irq_tab_pcit[slot][pin]; 139 140 140 141 case SNI_BRD_PCI_MTOWER: