aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/au1000/common/irq.c
diff options
context:
space:
mode:
authorPete Popov <ppopov@embeddedalley.com>2005-07-19 03:05:36 -0400
committerRalf Baechle <ralf@linux-mips.org>2005-10-29 14:31:56 -0400
commit3ce86ee14ba7c4b0f8ddae6030df9d0dee15b236 (patch)
tree9283cd659849be0deaea5fa80b7d8343edd5d926 /arch/mips/au1000/common/irq.c
parent7ab1261f5fe421602fadeda1d89662303b08830b (diff)
Au1x PM fixes.
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.c32
1 files changed, 17 insertions, 15 deletions
diff --git a/arch/mips/au1000/common/irq.c b/arch/mips/au1000/common/irq.c
index 6a25677bf3cb..112beb7fe001 100644
--- a/arch/mips/au1000/common/irq.c
+++ b/arch/mips/au1000/common/irq.c
@@ -83,7 +83,7 @@ inline void local_disable_irq(unsigned int irq_nr);
83void (*board_init_irq)(void); 83void (*board_init_irq)(void);
84 84
85#ifdef CONFIG_PM 85#ifdef CONFIG_PM
86extern void counter0_irq(int irq, void *dev_id, struct pt_regs *regs); 86extern irqreturn_t counter0_irq(int irq, void *dev_id, struct pt_regs *regs);
87#endif 87#endif
88 88
89static DEFINE_SPINLOCK(irq_lock); 89static DEFINE_SPINLOCK(irq_lock);
@@ -293,29 +293,31 @@ static struct hw_interrupt_type level_irq_type = {
293}; 293};
294 294
295#ifdef CONFIG_PM 295#ifdef CONFIG_PM
296void startup_match20_interrupt(void (*handler)(int, void *, struct pt_regs *)) 296void startup_match20_interrupt(irqreturn_t (*handler)(int, void *, struct pt_regs *))
297{ 297{
298 static struct irqaction action; 298 struct irq_desc *desc = &irq_desc[AU1000_TOY_MATCH2_INT];
299 /* This is a big problem.... since we didn't use request_irq
300 when kernel/irq.c calls probe_irq_xxx this interrupt will
301 be probed for usage. This will end up disabling the device :(
302 299
303 Give it a bogus "action" pointer -- this will keep it from 300 static struct irqaction action;
304 getting auto-probed! 301 memset(&action, 0, sizeof(struct irqaction));
305 302
306 By setting the status to match that of request_irq() we 303 /* This is a big problem.... since we didn't use request_irq
307 can avoid it. --cgray 304 * when kernel/irq.c calls probe_irq_xxx this interrupt will
305 * be probed for usage. This will end up disabling the device :(
306 * Give it a bogus "action" pointer -- this will keep it from
307 * getting auto-probed!
308 *
309 * By setting the status to match that of request_irq() we
310 * can avoid it. --cgray
308 */ 311 */
309 action.dev_id = handler; 312 action.dev_id = handler;
310 action.flags = 0; 313 action.flags = SA_INTERRUPT;
311 action.mask = 0; 314 cpus_clear(action.mask);
312 action.name = "Au1xxx TOY"; 315 action.name = "Au1xxx TOY";
313 action.handler = handler; 316 action.handler = handler;
314 action.next = NULL; 317 action.next = NULL;
315 318
316 irq_desc[AU1000_TOY_MATCH2_INT].action = &action; 319 desc->action = &action;
317 irq_desc[AU1000_TOY_MATCH2_INT].status 320 desc->status &= ~(IRQ_DISABLED | IRQ_AUTODETECT | IRQ_WAITING | IRQ_INPROGRESS);
318 &= ~(IRQ_DISABLED | IRQ_AUTODETECT | IRQ_WAITING | IRQ_INPROGRESS);
319 321
320 local_enable_irq(AU1000_TOY_MATCH2_INT); 322 local_enable_irq(AU1000_TOY_MATCH2_INT);
321} 323}