Subject: Re: adding external interrupt support for MPC8313e bsp

From: Scott Wood <[email-masked]>
Date: Thu, 22 May 2008 16:21:39 -0500

Suvidh Kankariya wrote:
> I have mpc8313e local bus connected to a external UART. and the 
> interrupt is connected to EXT_INT2.
> I am able to communicate to UART if I disable IRQ i.e IRQ = 0 in port 
> structure.
> 
> I am not able to understand how to tell kernel to use external IRQ -2.
> Should I put the external interrupts in device tree and if so how?

Yes, you should put them in the device tree in the interrupts property 
of the node corresponding to the device that is using the interrupt. 
The first cell should be 18 (decimal) for IRQ2 (see the IPIC section of 
the user manual for other external IRQs).  The second cell is defined 
the same as the PQ1/CPM2 PIC described in 
Documentation/booting-without-of.txt (2 for falling edge, 8 for active low).

> or can I use the interrupt directly in the driver  and in that case do I 
> need to map the interrupt.

Yes, if you don't put it in the device tree you need to call 
irq_create_mapping().  Using the device tree is recommended.

-Scott