cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
zaku89
Observer
Observer
705 Views
Registered: ‎05-30-2018

(Ultrascale+Petalinux2017.4) Two Interrupt port from one custom IP, the second interrupt is missing

I am running Petalinux 201.4 on Ultrazed board. I have a custom IP which will generate two rising edge interrupt signal every 100 us. I connect the two port to the PL-PS SPI interrupt (GIC NO: 121, 122) Because I have not set the trigger type in the vivado project (default will be level trigger). So I have to modify this edge property in the system-user.dtsi manually as follow: /include/ "system-conf.dtsi" / { }; / { chosen { bootargs = "earlycon clk_ignore_unused earlyprintk root=/dev/mmcblk1p2 rw rootwait rootfstype=ext4 mem=1024M uio_pdrv_genirq.of_id=generic-uio"; }; }; &TriggerGen_IP_0 { compatible = "generic-uio"; interrupts = <0 89 1 0 90 1>; }; Then I rebuild the petalinux and boot up the system. It seems I can only see and get Interrput 121(89+32) edge type. But I can not see or get the 122. Does anyone can help? Thank you!
0 Kudos
5 Replies
zaku89
Observer
Observer
684 Views
Registered: ‎05-30-2018

Sorry for the format, I have no idea why it looks so strange. I will repost it again.

 

I am running Petalinux 201.4 on Ultrazed board.

I have a custom IP which will generate two rising edge interrupt signal every 100 us.

I connect the two port to the PL-PS SPI interrupt (GIC NO: 121, 122)

Because I have not set the trigger type in the vivado project (default will be level trigger).

 

So I have to modify this edge property in the system-user.dtsi manually as follow:

 

/include/

"system-conf.dtsi"

/ {

};

/ {

chosen { bootargs = "earlycon clk_ignore_unused earlyprintk root=/dev/mmcblk1p2 rw rootwait rootfstype=ext4 mem=1024M uio_pdrv_genirq.of_id=generic-uio";

};

};

&TriggerGen_IP_0 {

            compatible = "generic-uio";

            interrupts = <0 89 1 0 90 1>;

          };

Then I rebuild the petalinux and boot up the system.

It seems I can only see and get Interrput 121(89+32) edge type.

But I can not see or get the 122.

Does anyone can help? Thank you!

0 Kudos
stephenm
Moderator
Moderator
677 Views
Registered: ‎09-12-2007

The UIO does not support multiple interrupt sources

 

You would need to update the source here:

drivers/uio/uio_pdrv_genirq.c

if (ret >= 1) {
uioinfo->irq = ret;
uioinfo->handler = uio_pdrv_genirq_handler;
uioinfo->irqcontrol = uio_pdrv_genirq_irqcontrol;
uioinfo->open = uio_pdrv_genirq_open;
uioinfo->release = uio_pdrv_genirq_release;
}

 

You would need to update the handler and irqcontrol functions too.

 

I have never tried this.

 

 

0 Kudos
zaku89
Observer
Observer
652 Views
Registered: ‎05-30-2018

Thank you Stephenm. I will try it.
0 Kudos
stephenm
Moderator
Moderator
645 Views
Registered: ‎09-12-2007

Let me know how you get on. If I have spare time I'll try this when I get back to office 

0 Kudos
rhaber
Visitor
Visitor
216 Views
Registered: ‎06-03-2020

I'm having this same issue trying to use PL to PS interrupts where my IP generates interrupts. Has a solution been found? Thx...

0 Kudos