]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
ssb-mipscore: Fix interrupt vectors
authorMichael Buesch <mb@bu3sch.de>
Tue, 8 Apr 2008 09:17:29 +0000 (11:17 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Wed, 9 Apr 2008 14:33:49 +0000 (10:33 -0400)
This fixes assignment of the interrupt vectors on the SSB MIPS core.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/ssb/driver_mipscore.c

index 3d3dd32bf3ab88475aa16ad6abccdc491682a86b..a9e7eb45b2e7b8f6611a7eb818e94980e5fbeecf 100644 (file)
@@ -109,12 +109,13 @@ static void set_irq(struct ssb_device *dev, unsigned int irq)
                clear_irq(bus, oldirq);
 
        /* assign the new one */
-       if (irq == 0)
-               ssb_write32(mdev, SSB_INTVEC, ((1 << irqflag) & ssb_read32(mdev, SSB_INTVEC)));
-
-       irqflag <<= ipsflag_irq_shift[irq];
-       irqflag |= (ssb_read32(mdev, SSB_IPSFLAG) & ~ipsflag_irq_mask[irq]);
-       ssb_write32(mdev, SSB_IPSFLAG, irqflag);
+       if (irq == 0) {
+               ssb_write32(mdev, SSB_INTVEC, ((1 << irqflag) | ssb_read32(mdev, SSB_INTVEC)));
+       } else {
+               irqflag <<= ipsflag_irq_shift[irq];
+               irqflag |= (ssb_read32(mdev, SSB_IPSFLAG) & ~ipsflag_irq_mask[irq]);
+               ssb_write32(mdev, SSB_IPSFLAG, irqflag);
+       }
 }
 
 static void ssb_mips_serial_init(struct ssb_mipscore *mcore)