aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/brcm47xx/patches-3.6/183-bcma-mips-show-also-disabled-irqs.patch
diff options
context:
space:
mode:
authorHauke Mehrtens <hauke@hauke-m.de>2013-01-03 16:56:54 +0000
committerHauke Mehrtens <hauke@hauke-m.de>2013-01-03 16:56:54 +0000
commita105eea1a13347ae64525a1b4e162edbb76e4ecc (patch)
treedad9b6c4ed80c29e9f44c1fa5c6b5cbbf4c6a1ea /target/linux/brcm47xx/patches-3.6/183-bcma-mips-show-also-disabled-irqs.patch
parentac383f95a515c4092f7fafe91046b8443beceaef (diff)
downloadupstream-a105eea1a13347ae64525a1b4e162edbb76e4ecc.tar.gz
upstream-a105eea1a13347ae64525a1b4e162edbb76e4ecc.tar.bz2
upstream-a105eea1a13347ae64525a1b4e162edbb76e4ecc.zip
brcm47xx: various fixes and code cleanups for irq code
This is based on a patch send by Nathan Hintz <nlhintz@hotmail.com> SVN-Revision: 34997
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.patch19
1 files changed, 13 insertions, 6 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
index 6606970e69..d44b3068e7 100644
--- 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
@@ -18,27 +18,25 @@
*/
unsigned int bcma_core_mips_irq(struct bcma_device *dev)
{
-@@ -88,13 +93,18 @@ unsigned int bcma_core_mips_irq(struct b
+@@ -88,13 +93,15 @@ 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++)
+- for (irq = 1; irq <= 4; irq++)
++ for (irq = 0; 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
+@@ -115,7 +122,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));
@@ -47,3 +45,12 @@
bcma_write32(mdev, BCMA_MIPS_MIPS74K_INTMASK(oldirq), 0);
/* assign the new one */
+@@ -145,7 +152,7 @@ static void bcma_core_mips_set_irq(struc
+ }
+
+ bcma_debug(bus, "set_irq: core 0x%04x, irq %d => %d\n",
+- dev->id.id, oldirq + 2, irq + 2);
++ dev->id.id, oldirq <= 4 ? oldirq + 2 : 0, irq + 2);
+ }
+
+ static void bcma_core_mips_set_irq_name(struct bcma_bus *bus, unsigned int irq,