How to set external interrupts falling edge sensitive
Frank Prepelica
Frank.Prepelica at ubidyne.com
Fri Feb 27 01:46:39 EST 2009
Hi all,
I'm using the mpc8313erdb. I got two external interrupt sources which
are
handled by two UIO drivers.
These interrupts shall be triggered on falling edge.
Therefore I just added (Kernel version 2.6.24) in
arch/powerpc/sysdev/ipic.c in function ipic_set_irq_type
at line ~484 "flow_type = IRQ_TYPE_EDGE_FALLING;"
/* only EXT IRQ senses are programmable on ipic
* internal IRQ senses are LEVEL_LOW
*/
flow_type = IRQ_TYPE_EDGE_FALLING; // <---- added this line
if (src == IPIC_IRQ_EXT0)
edibit = 15;
else
if (src >= IPIC_IRQ_EXT1 && src <= IPIC_IRQ_EXT7)
edibit = (14 - (src - IPIC_IRQ_EXT1));
else
return (flow_type & IRQ_TYPE_LEVEL_LOW) ? 0 :
-EINVAL;
and it seemed to work for me.
But when I'm adding this line in Kernel version 2.6.28.7
I'll get these messages on startup:
setting trigger mode 8 for irq 38 failed (0xc0017160)
setting trigger mode 8 for irq 37 failed (0xc0017160)
setting trigger mode 8 for irq 36 failed (0xc0017160)
setting trigger mode 8 for irq 35 failed (0xc0017160)
setting trigger mode 8 for irq 34 failed (0xc0017160)
setting trigger mode 8 for irq 33 failed (0xc0017160)
setting trigger mode 8 for irq 32 failed (0xc0017160)
...
It seems to me, that this is not the right place to configure the
external interrupts as "falling edge"
I guess that the dtb file might be the right place, please correct me if
I'm wrong. But I have no idea
how to add those both external interrupt sources into the dts file.
Any hints are appreciated! Thanks
regards
Frank
More information about the Linuxppc-dev
mailing list