]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - rpmsg/rpmsg.git/commit
TEMP: irqchip/irq-pruss-intc: Allow setting irq affinity for PRU events
authorTero Kristo <t-kristo@ti.com>
Thu, 18 Apr 2019 23:22:32 +0000 (18:22 -0500)
committerSuman Anna <s-anna@ti.com>
Sun, 28 Apr 2019 20:59:44 +0000 (15:59 -0500)
commit7681b35943a16ee1097bdcf644957842111f95bc
tree08d04c3980e46673efeb2edde211353b72452f3b
parent6929520b166894ac807fe61d900dd9627eb9554b
TEMP: irqchip/irq-pruss-intc: Allow setting irq affinity for PRU events

The PRUSS INTC irqchip implementation provides a standard IRQ API
for consumers to directly use the PRU System Events as interrupts
and uses chained interrupts for connecting these to the main ARM
GIC interrupt controller. Add support to the irqchip driver to set
irq affinity for these consumer PRU interrupts.

These consumer PRU interrupts are not directly connected to the ARM
GIC, so it is not possible to directly set the affinity for these
interrupts. The affinity is instead set on the real system irq or
the actual chained interrupt that the PRU event is mapped to. The
system irq is looked up using the programmed channel map and host
map registers, and is validated against the configured channel and
hosts as the channel map and host map registers are not reset in
pruss_intc_unconfigure().

NOTE:
1. The affinity for a PRU event can only be set after its channel
   map and host map are configured.
2. The PRUSS INTC design allows multiple events on a single system
   irq, so the actual affinity on the corresponding chained interrupt
   will be set to the last programmed affinity on any of the connected
   PRU events. The IRQ affinity data for other events is not updated.

Signed-off-by: Tero Kristo <t-kristo@ti.com>
[s-anna@ti.com: add error checks, update affinity logic & patch description]
Signed-off-by: Suman Anna <s-anna@ti.com>
drivers/irqchip/irq-pruss-intc.c