Porting Linux Device Driver with FIQ Interrupts from Kernel 3.14.28 to 6.1.36

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Porting Linux Device Driver with FIQ Interrupts from Kernel 3.14.28 to 6.1.36

511 Views
efendiogluacan
Contributor I

Hello,

 

I am currently in the process of porting a Linux device driver from kernel version 3.14.28 to kernel version 6.1.36. This driver is intended for a custom board equipped with IMX6SOLO. The driver makes use of both IRQ and FIQ interrupts, which are sourced from EPIT1 and EPIT2 timers, to supervise and control the GPIOs on the hardware. In my setup, EPIT1 needs to be configured as an FIQ source, while EPIT2 functions as an IRQ source.

 

For my driver, I used this blog (https://bootlin.com/blog/fiq-handlers-in-the-arm-linux-kernel/) as a reference guide. Interestingly, with kernel version 3.14.28, FIQ operates without issues. However, when shifting to kernel version 6.1.36, I've been unable to get FIQ handled correctly. It's important to note that IRQ handling functions as expected on both kernel versions.

 

To apply FIQ patches, I drew insights from this guide: https://community.nxp.com/t5/i-MX-Processors-Knowledge-Base/i-MX6-AVB-Demo-Implementation/ta-p/11270.... Once again, the patch application to kernel version 3.14.28 was successful, but I've been unable to replicate these changes to kernel version 6.1.36.

 

Given this scenario, my questions are:

Are there available FIQ implementations for kernel version 6.1.36 or any quite recent versions of kernel?

Considering the "FIQ Patches" labelled in the "AVB Demo Implementation", could there be additional steps or tweaks necessary for the FIQ to function correctly on the new kernel?

 

Any guidance, workarounds, or solutions to this problem would be hugely valuable. Thank you very much for your help and sharing your expertise.

 

Best regards

Labels (1)
0 Kudos
2 Replies

478 Views
AldoG
NXP TechSupport
NXP TechSupport

Hello,
 
I have sent to you more information through mail.

Saludos,
Aldo

0 Kudos

332 Views
kef2
Senior Contributor IV

Hello

Dear @AldoG, could you please give some hints why FIQ is kind of taboo so that it seems to be disabled on purpose in irq-gic.c driver. Are you as well TechSupports trying to cease public talks about FIQ?

FIQ could be nice helper to solve RT issues on iMX'es without built in Corttex M. And perhaps even be more suitable than Cortex-M when GPIO support is required. What about disabling whole GPIO banks just to let Cortex-M side using few GPIO pins?

I'm on the way to make it usable for my tasks. On not very fast Vybrid FIQ interrupt latency seems being shorter than it takes to clear PIT timer interrupt request, so 4 instructions FIQ handler reenters several times to toggle pin and clear PIT interrupt flag. Infinite persistence waveform looks like this with Linux running.

TEK0021.BMP

 

Last attempts to enable GIC interrupt grouping (and FIQ) in LInux kernel seem being made ~10 years ago. I mean suggested patches for irq-gic.c, which were never adopted.

 

0 Kudos