1 --- a/drivers/bcma/driver_mips.c
2 +++ b/drivers/bcma/driver_mips.c
3 @@ -75,11 +75,16 @@ static u32 bcma_core_mips_irqflag(struct
4 return dev->core_index;
5 flag = bcma_aread32(dev, BCMA_MIPS_OOBSELOUTA30);
14 /* Get the MIPS IRQ assignment for a specified device.
15 * If unassigned, 0 is returned.
16 + * If disabled, 5 is returned.
17 + * If not supported, 6 is returned.
19 unsigned int bcma_core_mips_irq(struct bcma_device *dev)
21 @@ -88,13 +93,15 @@ unsigned int bcma_core_mips_irq(struct b
24 irqflag = bcma_core_mips_irqflag(dev);
25 + if (irqflag == 0x3f)
28 - for (irq = 1; irq <= 4; irq++)
29 + for (irq = 0; irq <= 4; irq++)
30 if (bcma_read32(mdev, BCMA_MIPS_MIPS74K_INTMASK(irq)) &
37 EXPORT_SYMBOL(bcma_core_mips_irq);
39 @@ -115,7 +122,7 @@ static void bcma_core_mips_set_irq(struc
40 bcma_write32(mdev, BCMA_MIPS_MIPS74K_INTMASK(0),
41 bcma_read32(mdev, BCMA_MIPS_MIPS74K_INTMASK(0)) &
44 + else if (oldirq != 5)
45 bcma_write32(mdev, BCMA_MIPS_MIPS74K_INTMASK(oldirq), 0);
47 /* assign the new one */
48 @@ -145,7 +152,7 @@ static void bcma_core_mips_set_irq(struc
51 bcma_debug(bus, "set_irq: core 0x%04x, irq %d => %d\n",
52 - dev->id.id, oldirq + 2, irq + 2);
53 + dev->id.id, oldirq <= 4 ? oldirq + 2 : 0, irq + 2);
56 static void bcma_core_mips_set_irq_name(struct bcma_bus *bus, unsigned int irq,