Interrupt priority on the Linux P1020 - How to set it up?

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

Interrupt priority on the Linux P1020 - How to set it up?

Jump to solution
2,039 Views
alfonsokame
Contributor III

Hello,

I'm writing a linux kernel driver in order to control the 6 IRQs on the P1020.

My approach is to configure those IRqs in the device tree, to map them using irq_of_parse_and_map, to request them using request_irq

and to get the ISRs using the Read system call and the waitqueue. so far so good.

But I would like to configure the registers in order to set the priorities. Is the best approach to directly (atomic) write the PIC_EIVPR0...PIC_EIVPR6 registers?

is there any freescale approach to set the interrupt priorities on the QorIQ with Linux?

Thanks a lot for your reply

Labels (2)
1 Solution
1,398 Views
scottwood
NXP Employee
NXP Employee

mpic_irq_set_priority()

Note that interrupts are disabled while running an interrupt handler, so this won't allow a high priority interrupt to preempt a low priority interrupt.  It will still ensure that the highest priority interrupt is the next one to be processed after the current interrupt finishes.

View solution in original post

2 Replies
1,399 Views
scottwood
NXP Employee
NXP Employee

mpic_irq_set_priority()

Note that interrupts are disabled while running an interrupt handler, so this won't allow a high priority interrupt to preempt a low priority interrupt.  It will still ensure that the highest priority interrupt is the next one to be processed after the current interrupt finishes.

1,397 Views
tsybezoff
Contributor II

so how can i preempt a low priority interrupt??? i need it

0 Kudos