08-19-2009 09:47 AM
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.
08-19-2009 10:22 AM
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.
08-19-2009 11:14 AM
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?
08-19-2009 11:21 AM
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.