Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=fcee3faf8339bb65660c9a22123f71aa0cc30514
Commit:     fcee3faf8339bb65660c9a22123f71aa0cc30514
Parent:     f6771dbb27c704ce837ba3bb1dcaa53f48f76ea8
Author:     Thomas Bogendoerfer <[EMAIL PROTECTED]>
AuthorDate: Thu Nov 8 22:09:11 2007 +0100
Committer:  Ralf Baechle <[EMAIL PROTECTED]>
CommitDate: Thu Nov 15 23:21:50 2007 +0000

    [MIPS] SNI PCIT CPLUS: workaround for b0rked irq wiring of onboard PCI bus 1
    
    Signed-off-by: Thomas Bogendoerfer <[EMAIL PROTECTED]>
    Signed-off-by: Ralf Baechle <[EMAIL PROTECTED]>
---
 arch/mips/pci/fixup-sni.c |   23 ++++++++++++++++++++++-
 1 files changed, 22 insertions(+), 1 deletions(-)

diff --git a/arch/mips/pci/fixup-sni.c b/arch/mips/pci/fixup-sni.c
index a45bedd..5c8a79b 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:
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to