On Mon, Mar 30, 2009 at 9:57 AM, Yann Pelletier
<ypellet...@haivision.com> wrote:
>
> Hi,
> I'd like to add supports for interrupts handling from GPIO controller.  Some 
> of these interrupts are from I2C devices and some others are from SPI devices.
>
> What is the best approach to enable interrupts handling for those devices 
> through GPIO.

Modify the GPIO driver to also be a cascaded IRQ driver (see
http://patchwork.ozlabs.org/patch/21914/ for an example).

> Also,
>
> # cat /proc/interrupts
>           CPU0
>  16:         60   IPIC   Level     serial
>  17:          0   IPIC   Level     fpga
>  18:          4   IPIC   Level     mpc83xx_spi
>  21:          0   IPIC   Level     i2c-mpc
>  22:          7   IPIC   Level     i2c-mpc
>
> According to my platform device tree, serial irq should be on int9, SPI on 
> int16 and i2c on int14,15.  This causes me some problems as I need int18 to 
> map to external IRQ2.

These numbers are *Linux internal* virtual irq numbers.  They have no
relation to the physical IRQ number for each interrupt controller.
Just make sure your Device Tree maps the IRQs correctly and you'll be
okay.

g.

-- 
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
_______________________________________________
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev

Reply via email to