UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Contributor
Contributor
5,929 Views
Registered: ‎03-06-2009

Using Interrupt Controller kernel driver

All,

 

I have a system which interrupts when a FIFO fills up.  The interrupt is sent to the opb_intc.  I have a Linux device driver which "fishes" the IRQ number out of the device tree via of_irq_to_resource().  I need to enable the interrupt in the opb_intc.  Can I use an appropriate call to xilinx_intc_unmask() found in arch/powerpc/sysdev/xilinx_intc.c of the kernel tree?  Also, is there a function equivalent in the kernel to the XIntc_Connect found in the standalone libraries for the PowerPC405?  Any help would be appreciated.

 

Thanks

 

--David 

0 Kudos
3 Replies
Xilinx Employee
Xilinx Employee
5,923 Views
Registered: ‎04-23-2008

Re: Using Interrupt Controller kernel driver

You want to use request_irq(), enable_irq(), and disable_irq()

 

Maybe have a peek at xapp1129: http://www.xilinx.com/support/documentation/application_notes/xapp1129.pdf

I think "Linux Kernel Development" by Robert Love (Novell press) is a pretty good book, and there's always the old O'Reilly "Linux Device Drivers" book.

 

-Brian

0 Kudos
Contributor
Contributor
5,918 Views
Registered: ‎03-06-2009

Re: Using Interrupt Controller kernel driver

Brian,

 

I am using request_irq().  When I use the request_irq() call, does that take care of the enabling the opb_intc, enabling the device interrupt (i.e. write to DIER), and enable the IP interrupts (i.e. write to the IER)?  In other words, do I ever need to be concerned with writing anything to the registers of the opb_intc if I use the functions you mentioned?

 

Thanks,

 

-David 

0 Kudos
Xilinx Employee
Xilinx Employee
5,915 Views
Registered: ‎04-23-2008

Re: Using Interrupt Controller kernel driver

request_irq() will enable the interrupt (so your driver should be initialized enough to handle an interrupt immediately before you call it).

You should never need to use any xilinx intc functions directly.

 

-Brian

0 Kudos