PCI: mips: use generic pci_swizzle_interrupt_pin()
authorBjorn Helgaas <bjorn.helgaas@hp.com>
Tue, 9 Dec 2008 23:12:17 +0000 (16:12 -0700)
committerJesse Barnes <jbarnes@virtuousgeek.org>
Wed, 7 Jan 2009 19:12:55 +0000 (11:12 -0800)
Use the generic pci_swizzle_interrupt_pin() instead of arch-specific code.

Acked-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
arch/mips/pci/pci-ip27.c
arch/mips/pci/pci.c

index f97ab14..dda6f20 100644 (file)
@@ -146,12 +146,6 @@ int __devinit pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
        return 0;
 }
 
-/* Most MIPS systems have straight-forward swizzling needs.  */
-static inline u8 bridge_swizzle(u8 pin, u8 slot)
-{
-       return (((pin - 1) + slot) % 4) + 1;
-}
-
 static inline struct pci_dev *bridge_root_dev(struct pci_dev *dev)
 {
        while (dev->bus->parent) {
index 62cae74..fa63dc2 100644 (file)
@@ -149,19 +149,12 @@ out:
               "Skipping PCI bus scan due to resource conflict\n");
 }
 
-/* Most MIPS systems have straight-forward swizzling needs.  */
-
-static inline u8 bridge_swizzle(u8 pin, u8 slot)
-{
-       return (((pin - 1) + slot) % 4) + 1;
-}
-
 static u8 __init common_swizzle(struct pci_dev *dev, u8 *pinp)
 {
        u8 pin = *pinp;
 
        while (dev->bus->parent) {
-               pin = bridge_swizzle(pin, PCI_SLOT(dev->devfn));
+               pin = pci_swizzle_interrupt_pin(dev, pin);
                /* Move up the chain of bridges. */
                dev = dev->bus->self;
         }