Commit 4bbc257c authored by Suman Anna's avatar Suman Anna
Browse files

remoteproc/k3-r5: add support for IPC-only mode for all R5Fs



Add support to the K3 R5F remoteproc driver to configure all the R5F
cores to be either in IPC-only mode or the traditional remoteproc mode.
The IPC-only mode expects that the remote processors are already booted
by the bootloader, and only performs the minimum steps required to
initialize and deinitialize the virtio IPC transports. The remoteproc
mode allows the kernel remoteproc driver to do the regular load and
boot and other device management operations for a R5F core.

The IPC-only mode for a R5F core is detected and configured at driver
probe time by querying the System Firmware for the R5F power and reset
state and/or status and making sure that the R5F core is indeed started
by the bootloaders, otherwise the device is configured for remoteproc
mode.

Support for IPC-only mode is achieved through various flags in both
remoteproc core and the K3 R5F remoteproc driver. The support in
remoteproc core for this is added in commit c1a632fc ("remoteproc:
add infrastructure support to allow pre-loaded remoteprocs"). The current
support requires that the firmware still be requested to process the
resource table for retrieving the virtio device and trace resource
entries.

NOTE:
 - The driver cannot configure a R5F core for remoteproc mode by any
   means without rebooting the kernel if that R5F core has been started
   by a bootloader.
 - The resource table address retrieval logic can actually be done by
   providing the data through device tree (thereby bypassing the need to
   request the firmware), with the bootloader adding and/or updating the
   necessary DT properties. Another option is to use a design-by-contract
   approach of having the resource table located at a specific offset
   within one of the memory regions. This will be optimized for in
   the future.

Signed-off-by: default avatarSuman Anna <s-anna@ti.com>
parent c1a632fc
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment