diff options
author | hauke <hauke@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2013-01-03 01:55:34 +0000 |
---|---|---|
committer | hauke <hauke@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2013-01-03 01:55:34 +0000 |
commit | 3ebc20ac9e4248abcb38db30054756a0688faf2d (patch) | |
tree | 241e57d290a9304605a480b82c4552b15132f284 /target/linux/brcm47xx/patches-3.6/183-bcma-mips-show-also-disabled-irqs.patch | |
parent | e2a6028da3eccac80337a17129174ae2d7716b66 (diff) |
brcm47xx: improve IRQ handling for bcma based devices
This was party inspirited by patches send by Nathan Hintz <nlhintz@hotmail.com>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@34989 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/brcm47xx/patches-3.6/183-bcma-mips-show-also-disabled-irqs.patch')
-rw-r--r-- | target/linux/brcm47xx/patches-3.6/183-bcma-mips-show-also-disabled-irqs.patch | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/target/linux/brcm47xx/patches-3.6/183-bcma-mips-show-also-disabled-irqs.patch b/target/linux/brcm47xx/patches-3.6/183-bcma-mips-show-also-disabled-irqs.patch new file mode 100644 index 000000000..6606970e6 --- /dev/null +++ b/target/linux/brcm47xx/patches-3.6/183-bcma-mips-show-also-disabled-irqs.patch @@ -0,0 +1,49 @@ +--- a/drivers/bcma/driver_mips.c ++++ b/drivers/bcma/driver_mips.c +@@ -75,11 +75,16 @@ static u32 bcma_core_mips_irqflag(struct + return dev->core_index; + flag = bcma_aread32(dev, BCMA_MIPS_OOBSELOUTA30); + +- return flag & 0x1F; ++ if (flag) ++ return flag & 0x1F; ++ else ++ return 0x3f; + } + + /* Get the MIPS IRQ assignment for a specified device. + * If unassigned, 0 is returned. ++ * If disabled, 5 is returned. ++ * If not supported, 6 is returned. + */ + unsigned int bcma_core_mips_irq(struct bcma_device *dev) + { +@@ -88,13 +93,18 @@ unsigned int bcma_core_mips_irq(struct b + unsigned int irq; + + irqflag = bcma_core_mips_irqflag(dev); ++ if (irqflag == 0x3f) ++ return 6; + + for (irq = 1; irq <= 4; irq++) + if (bcma_read32(mdev, BCMA_MIPS_MIPS74K_INTMASK(irq)) & + (1 << irqflag)) + return irq; + +- return 0; ++ if ((1 << irqflag) & bcma_read32(mdev, BCMA_MIPS_MIPS74K_INTMASK(0))) ++ return 0; ++ ++ return 5; + } + EXPORT_SYMBOL(bcma_core_mips_irq); + +@@ -115,7 +125,7 @@ static void bcma_core_mips_set_irq(struc + bcma_write32(mdev, BCMA_MIPS_MIPS74K_INTMASK(0), + bcma_read32(mdev, BCMA_MIPS_MIPS74K_INTMASK(0)) & + ~(1 << irqflag)); +- else ++ else if (oldirq != 5) + bcma_write32(mdev, BCMA_MIPS_MIPS74K_INTMASK(oldirq), 0); + + /* assign the new one */ |