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

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.org


Signed-off-by: default avatarBjorn Andersson <bjorn.andersson@linaro.org>
parent 6e20a051
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -363,6 +363,7 @@ enum rsc_handling_status {
 * @start:	power on the device and boot it
 * @stop:	power off the device
 * @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)
 * @da_to_va:	optional platform hook to perform address translations
 * @parse_fw:	parse firmware to extract information (e.g. resource table)
@@ -387,6 +388,7 @@ struct rproc_ops {
	int (*start)(struct rproc *rproc);
	int (*stop)(struct rproc *rproc);
	int (*attach)(struct rproc *rproc);
	int (*detach)(struct rproc *rproc);
	void (*kick)(struct rproc *rproc, int vqid);
	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);