]> git.hungrycats.org Git - linux/commitdiff
[ARM PATCH] 2487/1: minor IRQ routing tweaks for ENP-2611
authorLennert Buytenhek <buytenh@org.rmk.(none)>
Thu, 17 Feb 2005 16:09:14 +0000 (16:09 +0000)
committerRussell King <rmk@flint.arm.linux.org.uk>
Thu, 17 Feb 2005 16:09:14 +0000 (16:09 +0000)
Patch from Lennert Buytenhek

- The PCI2050B bridge is not wired to any interrupt pin.
- The SPI-3 option board slot is wired to PCI_B.
- Don't printk every time enp2611_map_pci_irq is called.
- Complain loudly if we encounter an unknown device.

Signed-off-by: Lennert Buytenhek
Signed-off-by: Russell King
arch/arm/mach-ixp2000/enp2611.c

index ff2a4ef9ca92a5e350a0dc7e97bb175594d327cb..e4d2992d9427c0c0ff4cd9d173b30ea6795251a1 100644 (file)
@@ -124,20 +124,28 @@ static int __init enp2611_pci_map_irq(struct pci_dev *dev, u8 slot, u8 pin)
 {
        int irq;
 
-       if (dev->bus->number == 0x00 && PCI_SLOT(dev->devfn) == 0x01) {
+       if (dev->bus->number == 0 && PCI_SLOT(dev->devfn) == 0) {
+               /* IXP2400. */
+               irq = IRQ_IXP2000_PCIA;
+       } else if (dev->bus->number == 0 && PCI_SLOT(dev->devfn) == 1) {
                /* 21555 non-transparent bridge.  */
                irq = IRQ_IXP2000_PCIB;
-       } else if (dev->bus->number == 0x01 && PCI_SLOT(dev->devfn) == 0x00) {
+       } else if (dev->bus->number == 0 && PCI_SLOT(dev->devfn) == 4) {
+               /* PCI2050B transparent bridge.  */
+               irq = -1;
+       } else if (dev->bus->number == 1 && PCI_SLOT(dev->devfn) == 0) {
                /* 82559 ethernet.  */
                irq = IRQ_IXP2000_PCIA;
+       } else if (dev->bus->number == 1 && PCI_SLOT(dev->devfn) == 1) {
+               /* SPI-3 option board.  */
+               irq = IRQ_IXP2000_PCIB;
        } else {
-               printk(KERN_INFO "enp2611_pci_map_irq for unknown device\n");
-               irq = IRQ_IXP2000_PCI;
+               printk(KERN_ERR "enp2611_pci_map_irq() called for unknown "
+                               "device PCI:%d:%d:%d\n", dev->bus->number,
+                               PCI_SLOT(dev->devfn), PCI_FUNC(dev->devfn));
+               irq = -1;
        }
 
-       printk(KERN_INFO "Assigned IRQ %d to PCI:%d:%d:%d\n", irq,
-               dev->bus->number, PCI_SLOT(dev->devfn), PCI_FUNC(dev->devfn));
-
        return irq;
 }