2009-10-20 23:28:46     IRQ_TMR5 now IRQ_TIMER_5

Document created by Aaronwu Employee on Aug 19, 2013
Version 1Show Document
  • View in full screen mode

2009-10-20 23:28:46     IRQ_TMR5 now IRQ_TIMER_5

Frank Van Hooft (CANADA)

Message: 81500   


I suspect this is just a documentation update.


I was following this page:



but in 2009R1 on the BF523 this line would not compile:


ret = request_irq(IRQ_TMR5, gptimer_example_irq, IRQF_SHARED, DRIVER_NAME, &data);


with the compiler complaining about IRQ_TMR5.


error: ‘IRQ_TMR5’ undeclared (first use in this function)


Looking through the file arch/blackfin/mach-bf527/include/mach/irq.h I noticed that the IRQs appear to be called IRQ_TIMERx now.


With that change, the file compiled, but it wouldn't run, with the blackfin printing it's printk message saying the IRQ request failed.


Changing the IRQF_SHARED to IRQF_TRIGGER_NONE fixed that, and the IRQ began working as expected. So the final line of code ended up being:


ret = request_irq (IRQ_TIMER5, gptimer_example_irq, IRQF_TRIGGER_NONE, DRIVER_NAME, 0);







2009-10-21 17:27:30     Re: IRQ_TMR5 now IRQ_TIMER_5

Mike Frysinger (UNITED STATES)

Message: 81539   


thanks, there were other bugs in the code too.  ive cleaned up the example, moved it to svn, and split the documentation out here:





2009-10-21 18:26:42     Re: IRQ_TMR5 now IRQ_TIMER_5

Frank Van Hooft (CANADA)

Message: 81541   


You're most welcome. It's interesting that you were able to use IRQF_SHARED. When I used that, the blackfin wouldn't give me the IRQ. I had to use IRQF_TRIGGER_NONE. I wonder if perhaps it's because you're using a data structure, and I did the lazy thing and put a zero for that.




2009-10-22 01:09:46     Re: IRQ_TMR5 now IRQ_TIMER_5

Mike Frysinger (UNITED STATES)

Message: 81547   


i imagine you already had something that had requested the irq but didnt use the shared flag itself