diff mbox series

[v3,13/14] remoteproc: Document function rproc_set_state_machine()

Message ID 20200424200135.28825-14-mathieu.poirier@linaro.org (mailing list archive)
State New, archived
Headers show
Series remoteproc: Add support for synchronisaton with rproc | expand

Commit Message

Mathieu Poirier April 24, 2020, 8:01 p.m. UTC
Add a few words on the newly added rproc_set_state_machine()
in order to adversite the new API and help put people into
context.

Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
---
 Documentation/remoteproc.txt | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
diff mbox series

Patch

diff --git a/Documentation/remoteproc.txt b/Documentation/remoteproc.txt
index 2be1147256e0..550ed9a06a27 100644
--- a/Documentation/remoteproc.txt
+++ b/Documentation/remoteproc.txt
@@ -132,6 +132,23 @@  On success, the new rproc is returned, and on failure, NULL.
   **never** directly deallocate @rproc, even if it was not registered
   yet. Instead, when you need to unroll rproc_alloc(), use rproc_free().
 
+::
+
+  int rproc_set_state_machine(struct rproc *rproc,
+			      const struct rproc_ops *sync_ops,
+			      struct rproc_sync_flags sync_flags)
+
+This function should be called for cases where the remote processor has
+been started by another entity, be it a boot loader or trusted environment,
+and the remoteproc core is to synchronise with the remote processor rather
+then boot it.  The synchronisation flags @sync_flags tell the core whether
+it should synchronise with a remote processor when the core initialises, after
+a remote processor has crashed and after it was voluntarily stopped.  Operations
+provided in the @sync_ops should reflect the reality of the use case.  For
+example if the remoteproc core is to synchronise with a remote processor at
+initialisation time, sync_ops::find_loaded_rsc_table should provide a pointer to
+the resource table in memory rather than fetch it from the firmware image.
+
 ::
 
   void rproc_free(struct rproc *rproc)