Hello,

> > Can u give me an example with a single IRQ of a configuration-node for a
> > dts?
> 
> [EMAIL PROTECTED] {
>         interrupts = <1 2 3>;
>         interrupt-parent = <&mpc5200_pic>;
> };

Ahh - oh weh - so simple! Thank you!

> The interrupts property matches the size of the #interrupt-cells
> property in the interrupt controller node.  For the 5200-intc, each
> interrupt is described by 3 cells; l1, l2 and sense which is a
> reflection of the interrupt controller architecture.  For IRQ0, l1=0,
> l2=0; IRQ1, l1=1, l2=1; IRQ2, l1=1 and l2=2; IRQ3, l1=1, l2=3 Sense is
> described in mpc52xx-device-tree-bindings.txt

OK, my dts is now:

    / {
        /* ... */
        [EMAIL PROTECTED] {
            /* ... */
            [EMAIL PROTECTED] {
                interrupt-parent = <500>;
                interrupts = <1 2 2>;
            };
            /* ... */
        };
        /* ... */
    };

And the corresponding code is:

struct intmod_priv {
    /** Interrupt-Number */
    int own_irq;

    /** The of-device-node */
    struct device_node *intmod_dev_node;
};

static int __init mod_init( void )
{
    // ...
    priv.intmod_dev_node = NULL;
    priv.intmod_dev_node = of_find_node_by_name(NULL, "intpin");

    priv.own_irq = irq_of_parse_and_map(priv.intmod_dev_node, 0);
    request_irq(priv.own_irq, intmod_isr, IRQF_DISABLED , "intmod", 
INTMOD_IRQ_BOARD);
    // ...


Thank you and bye, my next question is following :-)

Silvio Fricke

-- 
-- S. Fricke ----------------------------- MAILTO:[EMAIL PROTECTED] --
   Diplom-Informatiker (FH)
   Linux-Entwicklung
----------------------------------------------------------------------------

Attachment: pgpQJrb5SadxX.pgp
Description: PGP signature

_______________________________________________
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev

Reply via email to