MPC8272: Edge triggered IRQ
I have pretty simple code that I did a long time ago
irqreturn_t irq_handler(int irq, void *dev_id, struct pt_regs *regs) {
..
return IRQ_HANDLED;
}
request_irq(irq,
&irq_handler,
SA_INTERRUPT,
"irq handler",
NULL);That code runs on MPC8272 and 2.6.18 kernel.
It triggers IRQ on low level (I thought it was falling edge by default). So, as long as I have input low level I have hundreds of calls. Pretty much it keeps calling IRQ handling routine.
How do I make it to trigger on falling edge?
Thank you,
Dmytro
Found solution:
immap->im_intctl.ic_siexr |= (1 << (14 - (irq - SIU_INT_IRQ1)));
Makes it trigger on falling edge
Quoted 20 lines · Dmytro Bablinyuk
I have pretty simple code that I did a long time ago
irqreturn_tirq_handler(int irq, void *dev_id, struct pt_regs *regs){
..
returnIRQ_HANDLED;
}request_irq(irq,
&irq_handler, SA_INTERRUPT, "irq handler", NULL);That code runs on MPC8272 and 2.6.18 kernel.
It triggers IRQ on low level (I thought it was falling edge by default). So, as long as I have input low level I have hundreds of calls. Pretty much it keeps calling IRQ handling routine.
How do I make it to trigger on falling edge?
Quoted 5 lines
Found solution:
immap->im_intctl.ic_siexr|= (1 << (14 - (irq -SIU_INT_IRQ1)));Makes it trigger on falling edge
Don't forget to set
irq_desc[SIU_INT_IRQ1].status &= ~IRQ_LEVEL;
That should be done in the IRQ initialization function referenced by ppc_md.init_IRQ.
Quoted 15 lines
Quoted 15 lines
I have pretty simple code that I did a long time ago
irqreturn_tirq_handler(int irq, void *dev_id, struct pt_regs *regs){
..
returnIRQ_HANDLED;
}request_irq(irq,
&irq_handler, SA_INTERRUPT, "irq handler", NULL);
Quoted 5 lines
Quoted 5 lines
That code runs on MPC8272 and 2.6.18 kernel.
It triggers IRQ on low level (I thought it was falling edge by default). So, as long as I have input low level I have hundreds of calls. Pretty much it keeps calling IRQ handling routine.
How do I make it to trigger on falling edge?
Laurent Pinchart