aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/au1000/common/irq.c
diff options
context:
space:
mode:
authorPete Popov <ppopov@embeddedalley.com>2005-03-13 08:19:05 +0000
committerRalf Baechle <ralf@linux-mips.org>2005-10-29 19:30:56 +0100
commita3701ca48763bbc681ee8db3d203827975849185 (patch)
tree9677ce80fb2dd3db49394665ddd1ca4f3bf8f2d5 /arch/mips/au1000/common/irq.c
parentsys_futex has 6 arguments. (diff)
downloadlinux-dev-a3701ca48763bbc681ee8db3d203827975849185.tar.xz
linux-dev-a3701ca48763bbc681ee8db3d203827975849185.zip
When CONFIG_PM is enabled, it uses the TOY_MATCH2 interrupt as the system
timer tick. Prior to this patch, if IDE IRQ probing occured, then the TOY_MATCH2 interrupt would be permanently disabled, and no system timer tick occurs. This patch corrects this situation by correctly registering the TOY_MATCH2 interrupt so that IDE IRQ probing doesn't have adverse side effects. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/au1000/common/irq.c')
-rw-r--r--arch/mips/au1000/common/irq.c36
1 files changed, 24 insertions, 12 deletions
diff --git a/arch/mips/au1000/common/irq.c b/arch/mips/au1000/common/irq.c
index ebf93bdbad14..6a25677bf3cb 100644
--- a/arch/mips/au1000/common/irq.c
+++ b/arch/mips/au1000/common/irq.c
@@ -293,8 +293,30 @@ static struct hw_interrupt_type level_irq_type = {
};
#ifdef CONFIG_PM
-void startup_match20_interrupt(void)
+void startup_match20_interrupt(void (*handler)(int, void *, struct pt_regs *))
{
+ static struct irqaction action;
+ /* This is a big problem.... since we didn't use request_irq
+ when kernel/irq.c calls probe_irq_xxx this interrupt will
+ be probed for usage. This will end up disabling the device :(
+
+ Give it a bogus "action" pointer -- this will keep it from
+ getting auto-probed!
+
+ By setting the status to match that of request_irq() we
+ can avoid it. --cgray
+ */
+ action.dev_id = handler;
+ action.flags = 0;
+ action.mask = 0;
+ action.name = "Au1xxx TOY";
+ action.handler = handler;
+ action.next = NULL;
+
+ irq_desc[AU1000_TOY_MATCH2_INT].action = &action;
+ irq_desc[AU1000_TOY_MATCH2_INT].status
+ &= ~(IRQ_DISABLED | IRQ_AUTODETECT | IRQ_WAITING | IRQ_INPROGRESS);
+
local_enable_irq(AU1000_TOY_MATCH2_INT);
}
#endif
@@ -517,17 +539,7 @@ void intc0_req1_irqdispatch(struct pt_regs *regs)
irq = au_ffs(intc0_req1) - 1;
intc0_req1 &= ~(1<<irq);
-#ifdef CONFIG_PM
- if (irq == AU1000_TOY_MATCH2_INT) {
- mask_and_ack_rise_edge_irq(irq);
- counter0_irq(irq, NULL, regs);
- local_enable_irq(irq);
- }
- else
-#endif
- {
- do_IRQ(irq, regs);
- }
+ do_IRQ(irq, regs);
}