This commit was manufactured by cvs2svn to create tag
[linux-2.6.git] / arch / i386 / pci / irq.c
index 18a394c..6aa9e5f 100644 (file)
@@ -17,7 +17,6 @@
 #include <asm/smp.h>
 #include <asm/io_apic.h>
 #include <asm/hw_irq.h>
-#include <linux/acpi.h>
 
 #include "pci.h"
 
@@ -128,15 +127,8 @@ void eisa_set_level_irq(unsigned int irq)
 {
        unsigned char mask = 1 << (irq & 7);
        unsigned int port = 0x4d0 + (irq >> 3);
-       unsigned char val;
-       static u16 eisa_irq_mask;
+       unsigned char val = inb(port);
 
-       if (irq >= 16 || (1 << irq) & eisa_irq_mask)
-               return;
-
-       eisa_irq_mask |= (1 << irq);
-       printk("PCI: setting IRQ %u as level-triggered\n", irq);
-       val = inb(port);
        if (!(val & mask)) {
                DBG(" -> edge");
                outb(val | mask, port);
@@ -460,16 +452,14 @@ static int pirq_bios_set(struct pci_dev *router, struct pci_dev *dev, int pirq,
 
 #endif
 
+
 static __init int intel_router_probe(struct irq_router *r, struct pci_dev *router, u16 device)
 {
-       static struct pci_device_id pirq_440gx[] = {
-               { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82443GX_0) },
-               { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82443GX_2) },
-               { },
-       };
-
        /* 440GX has a proprietary PIRQ router -- don't use it */
-       if (pci_dev_present(pirq_440gx))
+       if (    pci_find_device(PCI_VENDOR_ID_INTEL,
+                               PCI_DEVICE_ID_INTEL_82443GX_0, NULL) ||
+               pci_find_device(PCI_VENDOR_ID_INTEL,
+                               PCI_DEVICE_ID_INTEL_82443GX_2, NULL))
                return 0;
 
        switch(device)
@@ -814,7 +804,7 @@ static int pcibios_lookup_irq(struct pci_dev *dev, int assign)
        printk(KERN_INFO "PCI: %s IRQ %d for device %s\n", msg, irq, pci_name(dev));
 
        /* Update IRQ for all devices with the same pirq value */
-       while ((dev2 = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, dev2)) != NULL) {
+       while ((dev2 = pci_find_device(PCI_ANY_ID, PCI_ANY_ID, dev2)) != NULL) {
                pci_read_config_byte(dev2, PCI_INTERRUPT_PIN, &pin);
                if (!pin)
                        continue;
@@ -848,7 +838,7 @@ static void __init pcibios_fixup_irqs(void)
        u8 pin;
 
        DBG("PCI: IRQ fixup\n");
-       while ((dev = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, dev)) != NULL) {
+       while ((dev = pci_find_device(PCI_ANY_ID, PCI_ANY_ID, dev)) != NULL) {
                /*
                 * If the BIOS has set an out of range IRQ number, just ignore it.
                 * Also keep track of which IRQ's are already in use.
@@ -864,7 +854,7 @@ static void __init pcibios_fixup_irqs(void)
        }
 
        dev = NULL;
-       while ((dev = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, dev)) != NULL) {
+       while ((dev = pci_find_device(PCI_ANY_ID, PCI_ANY_ID, dev)) != NULL) {
                pci_read_config_byte(dev, PCI_INTERRUPT_PIN, &pin);
 #ifdef CONFIG_X86_IO_APIC
                /*
@@ -999,24 +989,13 @@ static int __init pcibios_irq_init(void)
 subsys_initcall(pcibios_irq_init);
 
 
-static void pirq_penalize_isa_irq(int irq)
+void pcibios_penalize_isa_irq(int irq)
 {
        /*
         *  If any ISAPnP device reports an IRQ in its list of possible
         *  IRQ's, we try to avoid assigning it to PCI devices.
         */
-       if (irq < 16)
-               pirq_penalty[irq] += 100;
-}
-
-void pcibios_penalize_isa_irq(int irq)
-{
-#ifdef CONFIG_ACPI_PCI
-       if (!acpi_noirq)
-               acpi_penalize_isa_irq(irq);
-       else
-#endif
-               pirq_penalize_isa_irq(irq);
+       pirq_penalty[irq] += 100;
 }
 
 int pirq_enable_irq(struct pci_dev *dev)