diff options
author | Loic Pallardy <loic.pallardy@st.com> | 2020-04-16 19:20:35 -0500 |
---|---|---|
committer | Bjorn Andersson <bjorn.andersson@linaro.org> | 2020-04-22 22:18:06 -0700 |
commit | 33467ac3c8dc80575e1b158e78d0c30ab33c1b08 (patch) | |
tree | e855070ecfb26bfce8b5a176c0c8e38fc1449282 /include | |
parent | e29ff72b779426c7fe462ead93c7ad77fe562935 (diff) | |
download | linux-stable-33467ac3c8dc80575e1b158e78d0c30ab33c1b08.tar.gz linux-stable-33467ac3c8dc80575e1b158e78d0c30ab33c1b08.tar.bz2 linux-stable-33467ac3c8dc80575e1b158e78d0c30ab33c1b08.zip |
remoteproc: Add prepare and unprepare ops
On some SoC architecture, it is needed to enable HW like
clock, bus, regulator, memory region... before loading
co-processor firmware.
This patch introduces prepare and unprepare ops to execute
platform specific function before firmware loading and after
stop execution.
Signed-off-by: Loic Pallardy <loic.pallardy@st.com>
Signed-off-by: Suman Anna <s-anna@ti.com>
Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Reviewed-by: Mathieu Poirier <mathieu.poirier@linaro.org>
Link: https://lore.kernel.org/r/20200417002036.24359-2-s-anna@ti.com
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/remoteproc.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/remoteproc.h b/include/linux/remoteproc.h index ac4082f12e8b..0468be4d02f4 100644 --- a/include/linux/remoteproc.h +++ b/include/linux/remoteproc.h @@ -355,6 +355,8 @@ enum rsc_handling_status { /** * struct rproc_ops - platform-specific device handlers + * @prepare: prepare device for code loading + * @unprepare: unprepare device after stop * @start: power on the device and boot it * @stop: power off the device * @kick: kick a virtqueue (virtqueue id given as a parameter) @@ -373,6 +375,8 @@ enum rsc_handling_status { * panic at least the returned number of milliseconds */ struct rproc_ops { + int (*prepare)(struct rproc *rproc); + int (*unprepare)(struct rproc *rproc); int (*start)(struct rproc *rproc); int (*stop)(struct rproc *rproc); void (*kick)(struct rproc *rproc, int vqid); |