linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* interrupt cells on mpc5200
@ 2008-09-10 16:40 Jon Smirl
  2008-09-10 16:54 ` Wolfgang Grandegger
  0 siblings, 1 reply; 3+ messages in thread
From: Jon Smirl @ 2008-09-10 16:40 UTC (permalink / raw)
  To: linuxppc-dev

mpc5200 interrupts have three cells in the device tree. How are these
interpreted?
Middle one is the interrupt number. Last one seems to always be zero.
What does the first one do, edge/level?

I searched through /Documentation and could find anything about three
cells for interrupts.

I understand the first one for gpio_wkup on interrupt 8. How does a
gpio_wkup generate an interrupt on interrupt 3?

		gpio_wkup: gpio-wkup@c00 {
			compatible = "fsl,mpc5200b-gpio-wkup","fsl,mpc5200-gpio-wkup";
			reg = <0xc00 0x40>;
			interrupts = <0x1 0x8 0x0 0x0 0x3 0x0>;
			interrupt-parent = <&mpc5200_pic>;
			gpio-controller;
			#gpio-cells = <2>;
		};

-- 
Jon Smirl
jonsmirl@gmail.com

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: interrupt cells on mpc5200
  2008-09-10 16:40 interrupt cells on mpc5200 Jon Smirl
@ 2008-09-10 16:54 ` Wolfgang Grandegger
  2008-09-10 17:39   ` Jon Smirl
  0 siblings, 1 reply; 3+ messages in thread
From: Wolfgang Grandegger @ 2008-09-10 16:54 UTC (permalink / raw)
  To: Jon Smirl; +Cc: linuxppc-dev

Jon Smirl wrote:
> mpc5200 interrupts have three cells in the device tree. How are these
> interpreted?
> Middle one is the interrupt number. Last one seems to always be zero.
> What does the first one do, edge/level?
> 
> I searched through /Documentation and could find anything about three
> cells for interrupts.
> 
> I understand the first one for gpio_wkup on interrupt 8. How does a
> gpio_wkup generate an interrupt on interrupt 3?
> 
> 		gpio_wkup: gpio-wkup@c00 {
> 			compatible = "fsl,mpc5200b-gpio-wkup","fsl,mpc5200-gpio-wkup";
> 			reg = <0xc00 0x40>;
> 			interrupts = <0x1 0x8 0x0 0x0 0x3 0x0>;
> 			interrupt-parent = <&mpc5200_pic>;
> 			gpio-controller;
> 			#gpio-cells = <2>;
> 		};

See
http://lxr.linux.no/linux+v2.6.26.5/Documentation/powerpc/mpc52xx-device-tree-bindings.txt#L263

Wolfgang.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: interrupt cells on mpc5200
  2008-09-10 16:54 ` Wolfgang Grandegger
@ 2008-09-10 17:39   ` Jon Smirl
  0 siblings, 0 replies; 3+ messages in thread
From: Jon Smirl @ 2008-09-10 17:39 UTC (permalink / raw)
  To: Wolfgang Grandegger; +Cc: linuxppc-dev

On Wed, Sep 10, 2008 at 12:54 PM, Wolfgang Grandegger <wg@grandegger.com> wrote:
> Jon Smirl wrote:
>> mpc5200 interrupts have three cells in the device tree. How are these
>> interpreted?
>> Middle one is the interrupt number. Last one seems to always be zero.
>> What does the first one do, edge/level?
>>
>> I searched through /Documentation and could find anything about three
>> cells for interrupts.
>>
>> I understand the first one for gpio_wkup on interrupt 8. How does a
>> gpio_wkup generate an interrupt on interrupt 3?
>>
>>               gpio_wkup: gpio-wkup@c00 {
>>                       compatible = "fsl,mpc5200b-gpio-wkup","fsl,mpc5200-gpio-wkup";
>>                       reg = <0xc00 0x40>;
>>                       interrupts = <0x1 0x8 0x0 0x0 0x3 0x0>;
>>                       interrupt-parent = <&mpc5200_pic>;
>>                       gpio-controller;
>>                       #gpio-cells = <2>;
>>               };
>
> See
> http://lxr.linux.no/linux+v2.6.26.5/Documentation/powerpc/mpc52xx-device-tree-bindings.txt#L263

Why was I too blind to see that file? So there must be someway to turn
a gpio_wkup into a critical interrupt which causes the interrupt 3
which is a feature I don't need.

Any hints on a good way to measure the length of pulses? They are
between 500us and 2ms long. I was thinking of using an interrupt on
the leading edge, starting a timer, and then flipping the gpio to
cause an interrupt on the trailing edge. I don't need extreme
accuracy.

-- 
Jon Smirl
jonsmirl@gmail.com

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-09-10 17:39 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-09-10 16:40 interrupt cells on mpc5200 Jon Smirl
2008-09-10 16:54 ` Wolfgang Grandegger
2008-09-10 17:39   ` Jon Smirl

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).