summaryrefslogtreecommitdiff
path: root/include/linux/remoteproc.h
diff options
context:
space:
mode:
authorBjorn Andersson <bjorn.andersson@linaro.org>2018-06-26 07:11:59 -0500
committerBjorn Andersson <bjorn.andersson@linaro.org>2018-06-26 14:09:12 -0700
commitc455daa4af3c3ee6e841fc9ed42024d6b8d50d66 (patch)
tree31ac7a50c43f4a4dfe7fd055302e54de2e35cb5f /include/linux/remoteproc.h
parent6f8b037308ea7511191b8280efc9d0d5b46c74fe (diff)
remoteproc: Introduce prepare and unprepare for subdevices
On rare occasions a subdevice might need to prepare some hardware resources before a remote processor is booted, and clean up some state after it has been shut down. One such example is the IP Accelerator found in various Qualcomm platforms, which is accessed directly from both the modem remoteproc and the application subsystem and requires an intricate lockstep process when bringing the modem up and down. Tested-by: Fabien Dessenne <fabien.dessenne@st.com> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org> [elder@linaro.org: minor description and comment edits] Signed-off-by Alex Elder <elder@linaro.org> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Diffstat (limited to 'include/linux/remoteproc.h')
-rw-r--r--include/linux/remoteproc.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/remoteproc.h b/include/linux/remoteproc.h
index 8f1426330cca..e3c5d856b6da 100644
--- a/include/linux/remoteproc.h
+++ b/include/linux/remoteproc.h
@@ -477,15 +477,19 @@ struct rproc {
/**
* struct rproc_subdev - subdevice tied to a remoteproc
* @node: list node related to the rproc subdevs list
+ * @prepare: prepare function, called before the rproc is started
* @start: start function, called after the rproc has been started
* @stop: stop function, called before the rproc is stopped; the @crashed
* parameter indicates if this originates from a recovery
+ * @unprepare: unprepare function, called after the rproc has been stopped
*/
struct rproc_subdev {
struct list_head node;
+ int (*prepare)(struct rproc_subdev *subdev);
int (*start)(struct rproc_subdev *subdev);
void (*stop)(struct rproc_subdev *subdev, bool crashed);
+ void (*unprepare)(struct rproc_subdev *subdev);
};
/* we currently support only two vrings per rvdev */