]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - rpmsg/rpmsg.git/commit
remoteproc/pru: add support for parsing pru interrupt mapping from DT
authorTero Kristo <t-kristo@ti.com>
Wed, 20 Feb 2019 21:14:16 +0000 (15:14 -0600)
committerSuman Anna <s-anna@ti.com>
Sun, 24 Feb 2019 01:20:52 +0000 (19:20 -0600)
commit8c84a06f059632f3359c9852ae7e5aa0fd4e0cff
tree3efcff8487f4e59c711f7ef71b85eedf98a24368
parentdc597fbb6a0c83fee98431a6a4d0f4950d522579
remoteproc/pru: add support for parsing pru interrupt mapping from DT

PRU interrupt mapping can now be parsed from devicetree also. The design
uses a single property "ti,pru-interrupt-map" in the PRU consumer nodes
to list all the interrupt mapping data associated with all the PRUs used
by the PRU consumer/application. This is an alternative configuration
method in addition to the legacy resource table config, and supercedes
any firmware provided intc configuration structure.

The design parses and configures the PRU INTC when a client driver
acquires a PRU core through pru_rproc_get(), and unconfigures the INTC
when it releases the PRU core through pru_rproc_put(). The design also
allows any referenced PRU cores with zero corresponding entries in the
"ti,pru-interrupt-map" property to fallback to use the interrupt mapping
data through the firmware intc vendor resource type, that is processed
during the loading/starting of the core through rproc_boot(). This
provides the maximum flexibility for PRU client drivers/applications.
If both are provided, the config in DT takes precedence. It is possible
that a client neither has the DT property nor uses the vendor resource
in its firmware, implying that particular PRU core doesn't use/need any
interrupts.

Signed-off-by: Tero Kristo <t-kristo@ti.com>
[rogerq@ti.com: refactor DT-parse logic into a separate function]
Signed-off-by: Roger Quadros <rogerq@ti.com>
[s-anna@ti.com: various fixes and cleanups, update patch description]
Signed-off-by: Suman Anna <s-anna@ti.com>
drivers/remoteproc/pru_rproc.c