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

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

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

跳至解决方案
3,239 次查看
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

标签 (2)
1 解答
2,598 次查看
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.

在原帖中查看解决方案

2 回复数
2,599 次查看
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.

2,597 次查看
tsybezoff
Contributor II

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

0 项奖励
回复