aboutsummaryrefslogtreecommitdiff
path: root/arch/mips/pci/fixup-sni.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2007-11-15 16:08:49 -0800
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-11-15 16:08:49 -0800
commit40787d0099676c9923e31fbdb90422d5c97cdcd5 (patch)
tree029b96d58712e390878795e76b46e8598601daeb /arch/mips/pci/fixup-sni.c
parent3c72f526dfe23f945ad034ae5a88649980d27a50 (diff)
parent72e510654c814e2c5c9227e95ae02ea77e015ce4 (diff)
Merge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus
* 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus: [MIPS] N32 needs to use the compat version of sys_nfsservctl. [MIPS] irq_cpu: use handle_percpu_irq handler to avoid dropping interrupts. [MIPS] Sibyte: Fix name of clocksource. [MIPS] SNI: s/achknowledge/acknowledge/ [MIPS] Makefile: Fix canonical system names [MIPS] vpe: handle halting TCs in an errata safe way. [MIPS] Sibyte: Stop timers before programming next even. [MIPS] Sibyte: Increase minimum oneshot timer interval to two ticks. [MIPS] Lasat: Fix overlap of interrupt number ranges. [MIPS] SNI PCIT CPLUS: workaround for b0rked irq wiring of onboard PCI bus 1 [MIPS] Fix shadow register support. [MIPS] Change get_cycles to always return 0. [MIPS] Fix typo in R3000 TRACE_IRQFLAGS code [MIPS] Sibyte: Replace use of removed IO_SPACE_BASE with IOADDR. [MIPS] iounmap if in vr41xx_pciu_init() pci clock is over 33MHz [MIPS] BCM1480: Remove duplicate acknowledge of timer interrupt. [MIPS] Sibyte: pin timer interrupt to their cores. [MIPS] Qemu: Add early printk, your friend in a cold night. [MIPS] Convert reference to mem_map to pfn_to_page(). [MIPS] Sibyte: resurrect old cache hack.
Diffstat (limited to 'arch/mips/pci/fixup-sni.c')
-rw-r--r--arch/mips/pci/fixup-sni.c23
1 files changed, 22 insertions, 1 deletions
diff --git a/arch/mips/pci/fixup-sni.c b/arch/mips/pci/fixup-sni.c
index a45bedd1723..5c8a79bb266 100644
--- a/arch/mips/pci/fixup-sni.c
+++ b/arch/mips/pci/fixup-sni.c
@@ -113,6 +113,16 @@ static char irq_tab_pcit[13][5] __initdata = {
{ 0, INTA, INTB, INTC, INTD }, /* Slot 5 */
};
+static char irq_tab_pcit_cplus[13][5] __initdata = {
+ /* INTA INTB INTC INTD */
+ { 0, 0, 0, 0, 0 }, /* HOST bridge */
+ { 0, INTB, INTC, INTD, INTA }, /* PCI Slot 9 */
+ { 0, 0, 0, 0, 0 }, /* PCI-EISA */
+ { 0, 0, 0, 0, 0 }, /* Unused */
+ { 0, INTA, INTB, INTC, INTD }, /* PCI-PCI bridge */
+ { 0, INTB, INTC, INTD, INTA }, /* fixup */
+};
+
static inline int is_rm300_revd(void)
{
unsigned char csmsr = *(volatile unsigned char *)PCIMT_CSMSR;
@@ -123,8 +133,19 @@ static inline int is_rm300_revd(void)
int __init pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
{
switch (sni_brd_type) {
- case SNI_BRD_PCI_TOWER:
case SNI_BRD_PCI_TOWER_CPLUS:
+ if (slot == 4) {
+ /*
+ * SNI messed up interrupt wiring for onboard
+ * PCI bus 1; we need to fix this up here
+ */
+ while (dev && dev->bus->number != 1)
+ dev = dev->bus->self;
+ if (dev && dev->devfn >= PCI_DEVFN(4, 0))
+ slot = 5;
+ }
+ return irq_tab_pcit_cplus[slot][pin];
+ case SNI_BRD_PCI_TOWER:
return irq_tab_pcit[slot][pin];
case SNI_BRD_PCI_MTOWER: