aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars-Peter Clausen <lars@metafoo.de>2010-08-21 15:58:44 +0000
committerLars-Peter Clausen <lars@metafoo.de>2010-08-21 15:58:44 +0000
commitbcdf9742beac64c6cd911e3eb03f11cfb6d15bde (patch)
treeaba86157a33b4f37b3d6b0525ad31e4f0ea8b4ba
parent649d2134287cdd4c31145e3d7bb41e401ae2222c (diff)
downloadupstream-bcdf9742beac64c6cd911e3eb03f11cfb6d15bde.tar.gz
upstream-bcdf9742beac64c6cd911e3eb03f11cfb6d15bde.tar.bz2
upstream-bcdf9742beac64c6cd911e3eb03f11cfb6d15bde.zip
Danube: Fix irq ack
SVN-Revision: 22748
-rw-r--r--target/linux/ifxmips/files-2.6.33/arch/mips/ifxmips/danube/irq.c22
1 files changed, 21 insertions, 1 deletions
diff --git a/target/linux/ifxmips/files-2.6.33/arch/mips/ifxmips/danube/irq.c b/target/linux/ifxmips/files-2.6.33/arch/mips/ifxmips/danube/irq.c
index 18b8d01d42..ce198e321c 100644
--- a/target/linux/ifxmips/files-2.6.33/arch/mips/ifxmips/danube/irq.c
+++ b/target/linux/ifxmips/files-2.6.33/arch/mips/ifxmips/danube/irq.c
@@ -55,6 +55,26 @@ ifxmips_mask_and_ack_irq(unsigned int irq_nr)
}
EXPORT_SYMBOL(ifxmips_mask_and_ack_irq);
+static void
+ifxmips_ack_irq(unsigned int irq_nr)
+{
+ int i;
+ u32 *isr = IFXMIPS_ICU_IM0_ISR;
+
+ irq_nr -= INT_NUM_IRQ0;
+ for (i = 0; i <= 4; i++)
+ {
+ if (irq_nr < INT_NUM_IM_OFFSET)
+ {
+ ifxmips_w32((1 << irq_nr), isr);
+ return;
+ }
+ isr += IFXMIPS_ICU_OFFSET;
+ irq_nr -= INT_NUM_IM_OFFSET;
+ }
+}
+
+
void
ifxmips_enable_irq(unsigned int irq_nr)
{
@@ -96,7 +116,7 @@ ifxmips_irq_type = {
.enable = ifxmips_enable_irq,
.disable = ifxmips_disable_irq,
.unmask = ifxmips_enable_irq,
- .ack = ifxmips_end_irq,
+ .ack = ifxmips_ack_irq,
.mask = ifxmips_disable_irq,
.mask_ack = ifxmips_mask_and_ack_irq,
.end = ifxmips_end_irq,