This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

IRQ number for OMAPl138 in linux

Other Parts Discussed in Thread: OMAPL138, DA8XX

Hi



Currently iam using the linux OS for omapl138. I tried to use GPIO as interrupt and it is working.i tried to find the IRQ number using the below API

IRQNum = gpio_to_irq(gpio_num);

It shows 194 as output. What this 194 signify? Totally only 101 system interrupts are available in the OMAPl138.

whether this value get reflected in any AINTC registers??

Iam devolping uPP driver to receive data from the FPGA. For that i have to register the interrupt with linux kernel and get IRQ, any specific API available for this.KIndly help me

Regards
Vijayabharathi C

  • You can trace to where that number is calculated. The relevant code

     arch/arm/mach-davinci/gpio.c <- see davinci_gpio_irq_setup, gpio_to_irq*
     arch/arm/mach-davinci/da850.c <- see davinci_soc_info_da850
     arch/arm/mach-davinci/include/mach/irqs.h <- IRQ_DA8XX_GPIO0
     davinci/include/mach/da8xx.h <- DA8XX_GPIO_BASE

    From what I can tell, the irq number represents real IRQ numbers. Any numbers above the real ones are "virtual" GPIO IRQs. The SOC info implicity has unbanked=0 or banked. That would mean 194 represents GPIO = 194-101 = 93 => chip=2 and io=29. The AINTC code in gpio.c:davinci_gpio_irq_setup() appears to chain in handlers for all 144 GPIOS(9 banks of 16) via IRQS IRQ_DA8XX_GPIO0=42 though IRQ_DA8XX_GPIO8=50.

    In arch/arm/mach-davinci/board-da850-evm.c, there is an example of attaching a handler to a GPIO IRQ.  See da850_evm_usb_ocic_notify(). See Documentation/gpio.txt for user space access to GPIO. The later kernel versions have IRQ handling.

  • Thanks Norman

    What about uPP interrupt, can i directly give IRQ Number as 91 for uPP irq?? in the below API?

    int request_irq (unsigned int irq, void (*handler) (int, void *, struct pt_regs *), unsigned long irqflags, const char *devname, void *dev_id); 

    Regards

    Vijayabharathi C

  • It's been a while since I had to write drivers from scratch. I would guess that should work. You can always try it to find out. Experimentation is the sometimes the only way to develop with something like Linux. For readabilty, you should use the macro IRQ_DA850_RPIINT instead of 91 though.

     

  • Hi, Norman

    finally, I made the file system boot in 25 seconds to QT.... total time, from power on to QT screen shows. 11 seconds passed while seeing the kernel starts to boot. don't know why u-boot takes such a long time to load kernel from spi @ 30MHz but in fact only 700KB transfer rate.. increase CPU speed should help a little bit. 600M might decrease the decode time to half, I think. but could only save 2-3 seconds... too long for starting kernel...

    Power Pan