Commit 7f3bd0c0 authored by Mathieu Poirier's avatar Mathieu Poirier Committed by Bjorn Andersson

remoteproc: Add new detach() remoteproc operation

Add an new detach() operation in order to support scenarios where
the remoteproc core is going away but the remote processor is
kept operating.  This could be the case when the system is
rebooted or when the platform driver is removed.
Signed-off-by: default avatarMathieu Poirier <mathieu.poirier@linaro.org>
Reviewed-by: default avatarPeng Fan <peng.fan@nxp.com>
Reviewed-by: default avatarArnaud Pouliquen <arnaud.pouliquen@st.com>
Link: https://lore.kernel.org/r/20210312162453.1234145-9-mathieu.poirier@linaro.orgSigned-off-by: default avatarBjorn Andersson <bjorn.andersson@linaro.org>
parent 6e20a051
...@@ -363,6 +363,7 @@ enum rsc_handling_status { ...@@ -363,6 +363,7 @@ enum rsc_handling_status {
* @start: power on the device and boot it * @start: power on the device and boot it
* @stop: power off the device * @stop: power off the device
* @attach: attach to a device that his already powered up * @attach: attach to a device that his already powered up
* @detach: detach from a device, leaving it powered up
* @kick: kick a virtqueue (virtqueue id given as a parameter) * @kick: kick a virtqueue (virtqueue id given as a parameter)
* @da_to_va: optional platform hook to perform address translations * @da_to_va: optional platform hook to perform address translations
* @parse_fw: parse firmware to extract information (e.g. resource table) * @parse_fw: parse firmware to extract information (e.g. resource table)
...@@ -387,6 +388,7 @@ struct rproc_ops { ...@@ -387,6 +388,7 @@ struct rproc_ops {
int (*start)(struct rproc *rproc); int (*start)(struct rproc *rproc);
int (*stop)(struct rproc *rproc); int (*stop)(struct rproc *rproc);
int (*attach)(struct rproc *rproc); int (*attach)(struct rproc *rproc);
int (*detach)(struct rproc *rproc);
void (*kick)(struct rproc *rproc, int vqid); void (*kick)(struct rproc *rproc, int vqid);
void * (*da_to_va)(struct rproc *rproc, u64 da, size_t len, bool *is_iomem); void * (*da_to_va)(struct rproc *rproc, u64 da, size_t len, bool *is_iomem);
int (*parse_fw)(struct rproc *rproc, const struct firmware *fw); int (*parse_fw)(struct rproc *rproc, const struct firmware *fw);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment