IMX8MP PCIE Legacy Interrupt using uio

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

IMX8MP PCIE Legacy Interrupt using uio

651 Views
Samhitha_Kashyap
Contributor III

I am using the uio_pci_generic driver to handle leagcy interrupts.

Issue: The interrupt is seen in the driver, but not delivered to user space and does not get reflected in cat /proc/interrupts; the resulting log for the interrupt is mentioned below:

#cat /proc/interrupts

233: 0 0 0 0 GICv3 158 Level uio_pci_generic

For the user space appication, have used the example code as available in the document:

Reference Document 

I verified the interrupt is triggered from the pcie card connected.

# lspci
00:00.0 PCI bridge: Synopsys, Inc. DWC_usb3 / PCIe bridge (rev 01)
01:00.0 Ethernet controller: Intel Corporation I210 Gigabit Network Connection (rev 03)

Can anyone help me resolve the issue?

Hardware: Variscite's imx8mp board

0 Kudos
4 Replies

603 Views
Dhruvit
NXP TechSupport
NXP TechSupport

Hi @Samhitha_Kashyap,

One needs to register interrupt using request_irq() to get the interrupt in the /proc/interrupts.

Could you please confirm if you have done that with the driver that you mentioned?

 

Thank you.
Best Regards,
Dhruvit.

0 Kudos

583 Views
Samhitha_Kashyap
Contributor III
Hi Dhruvit,

Thanks for the reply!

Yes, I have used the request_irq() in the driver and can see the interrupt registered in /proc/interrupts.
Please find the interrupt registered in /proc/interrupts:
#cat /proc/interrupts
233: 0 0 0 0 GICv3 158 Level uio_pci_generic

But when I wait for the interrupt in user application, I don't receive the interrupts and there is no change in /proc/interrupts.

Thanks & Regards,
Samhitha Kashyap
0 Kudos

559 Views
Dhruvit
NXP TechSupport
NXP TechSupport

Hi @Samhitha_Kashyap,

Please note that the example code to which you are referring to doesn't clear the interrupt_disable bit[10]. It only reads the interrupt status bit.

As described in uio-howto,

"On each interrupt, uio_pci_generic sets the Interrupt Disable bit. This prevents the device from generating further interrupts until the bit is cleared. The user-space driver should clear this bit before blocking and waiting for more interrupts."

One should clear the interrupt_disable bit before waiting for interrupts.

Could you please try adding the above functionality in the user-space code?

 

Thanks & Regards,
Dhruvit.

0 Kudos

629 Views
tzeng015
Contributor II

Hi 

I am porting i210 on the imx8mm board. Can you share me the dts arrange ? 

This is my problem.

https://www.youtube.com/shorts/3jO6BhMUrl8

Can you give me a hand ?

thank you

tzeng015

0 Kudos