AnsweredAssumed Answered

What is the correct IRQ number for EPIT in the Linux kernel?

Question asked by Kévin Roussel on May 23, 2019
Latest reply on Jun 6, 2019 by Kévin Roussel

Hello,

 

I am still developing a Linux kernel module -- on a i.MX6UL-based embedded system -- to wake up my system from suspend mode after some delay, using the EPIT to raise an interrupt. (I already asked a question for this work here : Why does my i.MX6UL-based Linux system freezes when accessing IO memory?)

 

I am now trying to install an interrupt handler reacting to EPIT interrupts. Calling the request_irq kind of works... except I don't actually have the correct IRQ number!

 

The iMX6UL manual (chapter 3) indicates that the EPIT1 irq number is 88 (from which you visibly need to subtract 32).

However, it is not the IRQ number actually used by Linux!

When my module is loaded, the /proc/interrupts file shows:

      CPU0
 16: 873381      GPC  55 Level i.MX Timer Tick
 17:      0      GPC  20 Level snvs-secvio
 19:    867      GPC  33 Level 2010000.ecspi
 20:      0      GPC  34 Level 2014000.ecspi
 21:      0      GPC  39 Level 2018000.serial
 22:   8559      GPC  26 Level 2020000.serial
 23:      0      GPC  40 Level 2024000.serial
 24:      0      GPC  50 Level 2034000.asrc
 56:      0 gpio-mxc  23 Edge  Module d'essai EPIT i.MX6-UL
169:      0 gpio-mxc   0 Edge  gpiolib
201:      0      GPC   4 Level 20cc000.snvs:snvs-powerkey
204:      0      GPC  49 Level imx_thermal
213:    575      GPC   2 Level sdma
219:      0      GPC  43 Level 2184000.usb
220:   4151      GPC  42 Level 2184200.usb
221: 134575      GPC 118 Level 2188000.ethernet
222:      0      GPC 119 Level 2188000.ethernet
223:  16418      GPC  22 Level mmc0
224: 133310      GPC  23 Level mmc1
225:      0      GPC  38 Level 21a8000.i2c
227:      0      GPC  27 Level 21e8000.serial
228:      0      GPC  28 Level 21ec000.serial
229:      0      GPC  29 Level 21f0000.serial
230:      0      GPC  30 Level 21f4000.serial
231:      0      GPC  17 Level 21fc000.serial
232:     14      GPC 105 Level 2141000.jr0
233:      0      GPC 106 Level 2142000.jr1
234:      0      GPC  46 Level 2143000.jr2
IPI0:     0 CPU wakeup interrupts
IPI1:     0 Timer broadcast interrupts
IPI2:     0 Rescheduling interrupts
IPI3:     0 Function call interrupts
IPI4:     0 Single function call interrupts
IPI5:     0 CPU stop interrupts
IPI6:     0 IRQ work interrupts
IPI7:     0 completion interrupts
Err:      0

 

The IRQ number you give to the function request_irq corresponds to the first column of the /proc/interrupts file, while the IRQ numbers given by the reference manual corresponds to the fourth column!

 

I cannot find what IRQ number to use in order to actually install the interrupt handler for EPIT...

Does anybody know how to find the appropriate IRQ number?

 

Thanks in advance,

 

 

PS: my system runs Debian Linux 8 ("Jessie"), and thus the version 4.1.15 of the Linux kernel. The source for my module is attached.

Attachments

Outcomes