remoteproc/pruss: manage PRUs without virtio devices manually
A PRUSS consists of dual 32-bit RISC PRU cores, with each having
a separate firmware file. The programmable nature of the PRU means
that it can be running any software. A PRU core sometimes may not
communicate with the host processor at all and can strictly be used
to aid/complement the software running on the other PRU core, as a
slave core.
The remoteproc infrastructure auto-boots the processors that have
support for virtio transports (virtio devices in their resource
tables). The remoteproc virtio layer also handles the shutdown for
such remoteproc devices, but not for processors booted outside the
remoteproc virtio layer. Any remaining remoteproc devices have to
be managed by other drivers using rproc_boot() and rproc_shutdown()
API.
Support has been added to the PRU remoteproc driver itself to manage
the boot cycle of such PRU devices manually, by checking for the
presence (absence) of virtio devices. This is done to avoid having
any dummy drivers just to manage the life cycle of such PRU devices.
NOTE:
- This patch may not fly upstream because of the cyclic module reference
count held by the remoteproc core. The above API usage is meant for
other drivers, and not remoteproc platform implementation drivers.
This approach has to be evaluated again.
- The rmmod of the PRUSS remoteproc module can only succeed when the
PRU/PRUSS devices are unbound from their drivers, if there were any
manually booted PRU cores. Ideally, the boot would have to be
implemented in a different layer to avoid this issue.
Signed-off-by:
Suman Anna <s-anna@ti.com>
Loading
Please sign in to comment