Commit 64057cbb authored by Lennert Buytenhek's avatar Lennert Buytenhek Committed by Russell King

[ARM PATCH] 2487/1: minor IRQ routing tweaks for ENP-2611

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
parent 94909621
......@@ -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;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment