]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/arm/mach-integrator/pci.c
Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6
[linux-2.6-omap-h63xx.git] / arch / arm / mach-integrator / pci.c
index af7d3ff013ecf7fdb25e4efbcd34267eb9dc6e68..2fdb95433f0ae5beb02721724720c063ad0940db 100644 (file)
  *
  * Where A = pin 1, B = pin 2 and so on and pin=0 = default = A.
  * Thus, each swizzle is ((pin-1) + (device#-4)) % 4
- *
- * The following code swizzles for exactly one bridge.  
  */
-static inline int bridge_swizzle(int pin, unsigned int slot) 
-{
-       return (pin + slot) & 3;
-}
 
 /*
  * This routine handles multiple bridges.
@@ -81,15 +75,14 @@ static u8 __init integrator_swizzle(struct pci_dev *dev, u8 *pinp)
        if (pin == 0)
                pin = 1;
 
-       pin -= 1;
        while (dev->bus->self) {
-               pin = bridge_swizzle(pin, PCI_SLOT(dev->devfn));
+               pin = pci_swizzle_interrupt_pin(dev, pin);
                /*
                 * move up the chain of bridges, swizzling as we go.
                 */
                dev = dev->bus->self;
        }
-       *pinp = pin + 1;
+       *pinp = pin;
 
        return PCI_SLOT(dev->devfn);
 }