diff options
author | Mathieu Poirier <mathieu.poirier@linaro.org> | 2020-07-14 22:50:28 +0300 |
---|---|---|
committer | Bjorn Andersson <bjorn.andersson@linaro.org> | 2020-07-17 09:06:07 +0300 |
commit | a6a4f2857524007848f7957af432cddb4d43b593 (patch) | |
tree | cc73de2354e286fdf492744c58844875bc240f78 /drivers | |
parent | e2e5c55eed8023ecfbf4c9b623ef7dec343d1845 (diff) | |
download | linux-a6a4f2857524007848f7957af432cddb4d43b593.tar.xz |
remoteproc: Add new attach() remoteproc operation
Add an new attach() operation in order to properly deal with
scenarios where the remoteproc core needs to attach to a
remote processor that has been booted by another entity.
Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Tested-by: Arnaud Pouliquen <arnaud.pouliquen@st.com>
Link: https://lore.kernel.org/r/20200714195035.1426873-3-mathieu.poirier@linaro.org
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/remoteproc/remoteproc_internal.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/remoteproc/remoteproc_internal.h b/drivers/remoteproc/remoteproc_internal.h index 4ba7cb59d3e8..fc710866f8ce 100644 --- a/drivers/remoteproc/remoteproc_internal.h +++ b/drivers/remoteproc/remoteproc_internal.h @@ -79,6 +79,14 @@ static inline int rproc_unprepare_device(struct rproc *rproc) return 0; } +static inline int rproc_attach_device(struct rproc *rproc) +{ + if (rproc->ops->attach) + return rproc->ops->attach(rproc); + + return 0; +} + static inline int rproc_fw_sanity_check(struct rproc *rproc, const struct firmware *fw) { |