10-17-2017 03:11 AM
I am rather confused with interrupt priority assignments in ZynqMP. I am following these 2 documents -
From page 271 of the Doc2 (TRM), All of the SGI and SPI interrupt requests are assigned a unique ID number. The controller
uses the ID number to arbitrate. The interrupt distributor holds the list of pending
interrupts for each CPU and then selects the highest priority interrupt before issuing it to
the CPU interface. Interrupts of equal priority are resolved by selecting the lowest ID.
Query 1 : In Doc 1, the interrupt ID numbers are mostly 1 and in the Doc2 (TRM), there is no mention of ID numbers but only the IRQ Numbers. So which ID is being referred to here?
Query 2 : From the table System interrupts from Doc2(TRM) and assuming the ID numbers are actually the IRQ numbers, does it make a lot of sense for UART, SPI etc to have a higher priority by default than, for example, TTC timer?
Query 3 : How to explicitly assign the FPGA interrupts the highest priority in, for example, Linux?
Thanks in advance,
Phani Kiran Kara
10-20-2017 10:42 AM
The Interrupt ID and the IRQ number refers to the same, take a look to the IRQ-F2P (PL to PS interrupts) numbers (121-128 & 136-143). I think that your confusion comes with the PS to PL interrupts, referred to the common peripherals but driven to the PL rather than to the processor by itself.
I think that you miss the point of "Interrupts of equal priority are resolved by selecting the lowest ID".
I'm not sure how to configure the priority in Linux as I cannot find a way to set it in the DTS. For standalone mode the SCUGIC driver does provide a function to configure XScuGic_SetPriorityTriggerType so you can take a look to it :)