]> git.karo-electronics.de Git - mv-sheeva.git/blobdiff - arch/x86/pci/irq.c
Merge commit 'v2.6.29' into x86/setup-lzma
[mv-sheeva.git] / arch / x86 / pci / irq.c
index cc9d5e254060a7b91148ff4da3f6a9c7fde0a350..fecbce6e7d7c20d1f0af750e2305ef4e9a37a92c 100644 (file)
@@ -572,6 +572,7 @@ static __init int intel_router_probe(struct irq_router *r, struct pci_dev *route
        case PCI_DEVICE_ID_INTEL_ICH7_1:
        case PCI_DEVICE_ID_INTEL_ICH7_30:
        case PCI_DEVICE_ID_INTEL_ICH7_31:
+       case PCI_DEVICE_ID_INTEL_TGP_LPC:
        case PCI_DEVICE_ID_INTEL_ESB2_0:
        case PCI_DEVICE_ID_INTEL_ICH8_0:
        case PCI_DEVICE_ID_INTEL_ICH8_1:
@@ -1041,6 +1042,9 @@ static void __init pcibios_fixup_irqs(void)
        dev = NULL;
        while ((dev = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, dev)) != NULL) {
                pci_read_config_byte(dev, PCI_INTERRUPT_PIN, &pin);
+               if (!pin)
+                       continue;
+
 #ifdef CONFIG_X86_IO_APIC
                /*
                 * Recalculate IRQ numbers if we use the I/O APIC.
@@ -1048,9 +1052,6 @@ static void __init pcibios_fixup_irqs(void)
                if (io_apic_assign_pci_irqs) {
                        int irq;
 
-                       if (!pin)
-                               continue;
-
                        /*
                         * interrupt pins are numbered starting from 1
                         */
@@ -1068,7 +1069,7 @@ static void __init pcibios_fixup_irqs(void)
                                struct pci_dev *bridge = dev->bus->self;
                                int bus;
 
-                               pin = (((pin - 1) + PCI_SLOT(dev->devfn)) % 4) + 1;
+                               pin = pci_swizzle_interrupt_pin(dev, pin);
                                bus = bridge->bus->number;
                                irq = IO_APIC_get_PCI_irq_vector(bus,
                                                PCI_SLOT(bridge->devfn), pin - 1);
@@ -1091,7 +1092,7 @@ static void __init pcibios_fixup_irqs(void)
                /*
                 * Still no IRQ? Try to lookup one...
                 */
-               if (pin && !dev->irq)
+               if (!dev->irq)
                        pcibios_lookup_irq(dev, 0);
        }
 }
@@ -1232,7 +1233,7 @@ static int pirq_enable_irq(struct pci_dev *dev)
                        while (irq < 0 && dev->bus->parent) { /* go back to the bridge */
                                struct pci_dev *bridge = dev->bus->self;
 
-                               pin = (((pin - 1) + PCI_SLOT(dev->devfn)) % 4) + 1;
+                               pin = pci_swizzle_interrupt_pin(dev, pin);
                                irq = IO_APIC_get_PCI_irq_vector(bridge->bus->number,
                                                PCI_SLOT(bridge->devfn), pin - 1);
                                if (irq >= 0)