Question on setting up external interrupt for P1020 (MPC8xxx) with device tree

Scott Wood scottwood at freescale.com
Sat Feb 12 09:19:20 EST 2011


On Fri, 11 Feb 2011 17:15:47 -0500
Kenny Ho <kho at belairnetworks.com> wrote:

> Thanks Scott.
> 
> Do you know the logic of the hwirq <-> virq mapping?

It's dynamic.

> When I was digging into the GPIO interrupt, the hwirq seems to be the same as the virq

The allocator tries that if it's available, but if that virq is already
taken, or is in the legacy ISA region under 16, you'll get a different
number.

> (both are 47 which is 16 (external interrupt) + 31 (internal interrupt).
> If I want to use external interrupt 7 and 8, should the virq also be 7
> and 8?

No.

> For some reason I am getting 41 for virq... may be I am still
> doing something wrong.

It's correct.  Pass what you receive into request_irq().

-Scott



More information about the Linuxppc-dev mailing list