Skip to contentSkip to conversation

External int in dts

DISCUSSION Sean MacLennan 2 participants 3 messages Dec 28, 2007

lore
Share & tools
lore
#0 lore raw

I have an FPGA which uses external int 1, which is interrupt 24 on UIC0. I tried the following entry in various places:

       FPGA0: fpga {
           compatible = "pika,fpga";
           interrupts = <18 4>;
           interrupt-parent = <&UIC0>;
       };

Any hints, or is this the wrong way to enable an external int?

Cheers,
Sean

#1 lore raw
Quoted 6 lines · Sean MacLennan

I have an FPGA which uses external int 1, which is interrupt 24 on UIC0. I tried the following entry in various places:

        FPGA0: fpga {
            compatible = "pika,fpga";
            interrupts = <18 4>;

Is the interrupt level sensitive and active high? Then "4" is correct here. But if it is active low then you should use "8" here".

Best regards,
Stefan

=====================================================================
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 Email: [email protected]
=====================================================================

#2 lore raw
Quoted 5 lines · Stefan Roese
Quoted 3 lines · Sean MacLennan

I have an FPGA which uses external int 1, which is interrupt 24 on UIC0. I tried the following entry in various places:

Quoted 7 lines
Quoted 4 lines
        FPGA0: fpga {
            compatible = "pika,fpga";
            interrupts = <18 4>;

Is the interrupt level sensitive and active high? Then "4" is correct here. But if it is active low then you should use "8" here".

It was active low. Thank you.

I got it working. You do need some glue logic. Basically the following two lines (ignoring all error checking):

np = of_find_compatible_node(NULL, NULL, "pika,fpga"); irq = irq_of_parse_and_map(np, 0);

Simple!

Cheers,
Sean