]> err.no Git - linux-2.6/blobdiff - arch/mips/pci/fixup-jmr3927.c
x86: printk kernel version in WARN_ON and other dump_stack users
[linux-2.6] / arch / mips / pci / fixup-jmr3927.c
index f8696081c5b1fd089dc99d0abfc1021af6ec6868..e974394be7bc271b4e18e35130e3328ed1a73c7e 100644 (file)
  */
 #include <linux/types.h>
 #include <linux/pci.h>
-#include <linux/kernel.h>
 #include <linux/init.h>
 
 #include <asm/jmr3927/jmr3927.h>
 
-int __init pcibios_map_irq(struct pci_dev *dev, u8 slot, u8 pin)
+int __init pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
 {
        unsigned char irq = pin;
 
+       /* SMSC SLC90E66 IDE uses irq 14, 15 (default) */
+       if (dev->vendor == PCI_VENDOR_ID_EFAR &&
+           dev->device == PCI_DEVICE_ID_EFAR_SLC90E66_1)
+               return irq;
        /* IRQ rotation (PICMG) */
        irq--;                  /* 0-3 */
        if (dev->bus->parent == NULL &&
@@ -77,14 +80,8 @@ int __init pcibios_map_irq(struct pci_dev *dev, u8 slot, u8 pin)
 
        /* Check OnBoard Ethernet (IDSEL=A24, DevNu=13) */
        if (dev->bus->parent == NULL &&
-           slot == TX3927_PCIC_IDSEL_AD_TO_SLOT(24)) {
-               extern int jmr3927_ether1_irq;
-               /* check this irq line was reserved for ether1 */
-               if (jmr3927_ether1_irq != JMR3927_IRQ_ETHER0)
-                       irq = JMR3927_IRQ_ETHER0;
-               else
-                       irq = 0;        /* disable */
-       }
+           slot == TX3927_PCIC_IDSEL_AD_TO_SLOT(24))
+               irq = JMR3927_IRQ_ETHER0;
        return irq;
 }
 
@@ -93,13 +90,3 @@ int pcibios_plat_dev_init(struct pci_dev *dev)
 {
        return 0;
 }
-
-int __init pcibios_map_irq(struct pci_dev *dev, u8 slot, u8 pin)
-{
-       /* SMSC SLC90E66 IDE uses irq 14, 15 (default) */
-       if (!(dev->vendor == PCI_VENDOR_ID_EFAR &&
-             dev->device == PCI_DEVICE_ID_EFAR_SLC90E66_1))
-               return pci_get_irq(dev, pin);
-
-       dev->irq = irq;
-}