linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* adding external interrupt support for MPC8313e bsp
@ 2008-05-22 20:41 Suvidh Kankariya
  2008-05-22 21:21 ` Scott Wood
  0 siblings, 1 reply; 2+ messages in thread
From: Suvidh Kankariya @ 2008-05-22 20:41 UTC (permalink / raw)
  To: linuxppc-dev

Hi,
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?

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



Any help or pointer is highly appreciated.

Thanks in advance.


Suvidh

 

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

* Re: adding external interrupt support for MPC8313e bsp
  2008-05-22 20:41 adding external interrupt support for MPC8313e bsp Suvidh Kankariya
@ 2008-05-22 21:21 ` Scott Wood
  0 siblings, 0 replies; 2+ messages in thread
From: Scott Wood @ 2008-05-22 21:21 UTC (permalink / raw)
  To: Suvidh Kankariya; +Cc: linuxppc-dev

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

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

end of thread, other threads:[~2008-05-22 21:20 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-05-22 20:41 adding external interrupt support for MPC8313e bsp Suvidh Kankariya
2008-05-22 21:21 ` Scott Wood

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).