Configuration-Problem ext-interrupt on mpc52xx

6 messages, 4 authors, 2007-09-20 · open the first message on its own page

Configuration-Problem ext-interrupt on mpc52xx

From: S. Fricke <hidden>
Date: 2007-09-19 11:59:58

Hi,

how can i configure an "ext interrupt" to high-level? I want a interruption on
IRQ2, but I checked with an oscilloscope that the pin has a low state and I
needs a high state.

I have tried, after I got the irq (with irq_of_parse_and_map), set it with

    set_irq_type(irq, IRQ_TYPE_LEVEL_HIGH);

But I think it is a system-configuration (irq_desc) and no
device-configuration.

Mit freundlichen Gruessen
Silvio Fricke

-- 
-- S. Fricke ----------------------------- MAILTO:silvio.fricke@gmail.com --
   Diplom-Informatiker (FH)
   Linux-Entwicklung
----------------------------------------------------------------------------

Re: Configuration-Problem ext-interrupt on mpc52xx

From: Juergen Beisert <hidden>
Date: 2007-09-19 14:54:29

Silvio,

On Wednesday 19 September 2007 13:59, S. Fricke wrote:
how can i configure an "ext interrupt" to high-level? I want a interruption
on IRQ2, but I checked with an oscilloscope that the pin has a low state
and I needs a high state.

I have tried, after I got the irq (with irq_of_parse_and_map), set it with

    set_irq_type(irq, IRQ_TYPE_LEVEL_HIGH);

But I think it is a system-configuration (irq_desc) and no
device-configuration.
Try with the attached patch.

Regards,
Juergen

-- 
Dipl.-Ing. Juergen Beisert | http://www.pengutronix.de
 Pengutronix - Linux Solutions for Science and Industry
    Handelsregister: Amtsgericht Hildesheim, HRA 2686
         Vertretung Sued/Muenchen, Germany
   Phone: +49-8766-939 228 |  Fax: +49-5121-206917-9

Re: Configuration-Problem ext-interrupt on mpc52xx

From: Grant Likely <hidden>
Date: 2007-09-19 15:09:04

On 9/19/07, S. Fricke [off-list ref] wrote:
Hi,

how can i configure an "ext interrupt" to high-level? I want a interruption on
IRQ2, but I checked with an oscilloscope that the pin has a low state and I
needs a high state.

I have tried, after I got the irq (with irq_of_parse_and_map), set it with

    set_irq_type(irq, IRQ_TYPE_LEVEL_HIGH);

But I think it is a system-configuration (irq_desc) and no
device-configuration.
You shouldn't need to do this.  You set your sense level in the device tree.
From your previous email, your device node looks like this:
            intpin@0 {
                interrupt-parent = <500>;
                interrupts = <1 2 2>;
            };
Which is IRQ2, EDGE_FALLING.

If you change your interrupts property to <1 2 0>, then your sense is
set to LEVEL_HIGH.  (Seriously, you need to read the interrupts
section of Documentation/powerpc/mpc52xx-device-tree-bindings.txt.)

g.

-- 
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
grant.likely@secretlab.ca
(403) 399-0195

Re: Configuration-Problem ext-interrupt on mpc52xx

From: S. Fricke <hidden>
Date: 2007-09-19 19:01:55

Hello,
On 9/19/07, S. Fricke [off-list ref] wrote:
quoted
Hi,

how can i configure an "ext interrupt" to high-level? I want a interruption on
IRQ2, but I checked with an oscilloscope that the pin has a low state and I
needs a high state.

I have tried, after I got the irq (with irq_of_parse_and_map), set it with

    set_irq_type(irq, IRQ_TYPE_LEVEL_HIGH);

But I think it is a system-configuration (irq_desc) and no
device-configuration.
You shouldn't need to do this.  You set your sense level in the device tree.

From your previous email, your device node looks like this:
quoted
            intpin@0 {
                interrupt-parent = <500>;
                interrupts = <1 2 2>;
            };
Which is IRQ2, EDGE_FALLING.

If you change your interrupts property to <1 2 0>, then your sense is
set to LEVEL_HIGH.  (Seriously, you need to read the interrupts
section of Documentation/powerpc/mpc52xx-device-tree-bindings.txt.)
I have read it! But another driver on Boot-time pulled my interrupt to low, I
can't do anything except for looking at the oscilloscope

I'm going to disable all unneeded drivers tomorrow morning.

TIA:
Silvio Fricke

-- 
-- S. Fricke ----------------------------- MAILTO:silvio.fricke@gmail.com --
   Diplom-Informatiker (FH)
   Linux-Entwicklung
----------------------------------------------------------------------------

Re: Configuration-Problem ext-interrupt on mpc52xx

From: David Gibson <hidden>
Date: 2007-09-19 23:40:16

On Wed, Sep 19, 2007 at 09:01:46PM +0200, S. Fricke wrote:
Hello,
quoted
On 9/19/07, S. Fricke [off-list ref] wrote:
quoted
Hi,

how can i configure an "ext interrupt" to high-level? I want a interruption on
IRQ2, but I checked with an oscilloscope that the pin has a low state and I
needs a high state.

I have tried, after I got the irq (with irq_of_parse_and_map), set it with

    set_irq_type(irq, IRQ_TYPE_LEVEL_HIGH);

But I think it is a system-configuration (irq_desc) and no
device-configuration.
You shouldn't need to do this.  You set your sense level in the device tree.

From your previous email, your device node looks like this:
quoted
            intpin@0 {
                interrupt-parent = <500>;
                interrupts = <1 2 2>;
            };
Which is IRQ2, EDGE_FALLING.

If you change your interrupts property to <1 2 0>, then your sense is
set to LEVEL_HIGH.  (Seriously, you need to read the interrupts
section of Documentation/powerpc/mpc52xx-device-tree-bindings.txt.)
I have read it! But another driver on Boot-time pulled my interrupt
Erm.. if the interrupt is shared with something else which expects a
different trigger/polarity, you're kind of stuffed....
to low, I can't do anything except for looking at the oscilloscope

I'm going to disable all unneeded drivers tomorrow morning.

TIA:
Silvio Fricke

_______________________________________________
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev
-- 
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson

Re: Configuration-Problem ext-interrupt on mpc52xx

From: S. Fricke <hidden>
Date: 2007-09-20 08:37:52

Hello,
quoted
I have read it! But another driver on Boot-time pulled my interrupt
Erm.. if the interrupt is shared with something else which expects a
different trigger/polarity, you're kind of stuffed....
YEEeess! An incomplete documentation is suboptimal! In german, we would
say: "[...] Das es die Sau krausst [...]"

I have now used an another Interrupt and it works.

Mit freundlichen Gruessen
Silvio Fricke

-- 
-- S. Fricke ----------------------------- MAILTO:silvio.fricke@gmail.com --
   Diplom-Informatiker (FH)                   TEL:       (+49)8330-911278
   Linux-Entwicklung                       JABBER:      fricke@jabber.org
-- Steinbacher Strasse 18, D-87764 Legau -----------------------------------
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help