summaryrefslogtreecommitdiff
path: root/drivers/remoteproc
diff options
context:
space:
mode:
authorBjorn Andersson <bjorn.andersson@linaro.org>2018-01-06 02:58:05 +0300
committerBjorn Andersson <bjorn.andersson@linaro.org>2018-01-15 20:30:04 +0300
commit0a8b81cb2e413eff4cd9aeac7ef415150b699fb4 (patch)
tree4e3901dcf686a9091ad02186386cf7c1ae143fa1 /drivers/remoteproc
parent4f6fd5a03779cefdf3401ed20690f67ff76cf1ff (diff)
downloadlinux-0a8b81cb2e413eff4cd9aeac7ef415150b699fb4.tar.xz
remoteproc: Reset table_ptr on stop
The installed resource table is no longer accessible after stopping the remote, so update table_ptr to point to the local copy. Reviewed-By: Loic Pallardy <loic.pallardy@st.com> Tested-By: Loic Pallardy <loic.pallardy@st.com> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Diffstat (limited to 'drivers/remoteproc')
-rw-r--r--drivers/remoteproc/remoteproc_core.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/remoteproc/remoteproc_core.c b/drivers/remoteproc/remoteproc_core.c
index 84e07d5b7c2c..4170dfbd93bd 100644
--- a/drivers/remoteproc/remoteproc_core.c
+++ b/drivers/remoteproc/remoteproc_core.c
@@ -1000,6 +1000,9 @@ static int rproc_stop(struct rproc *rproc)
/* remove any subdevices for the remote processor */
rproc_remove_subdevices(rproc);
+ /* the installed resource table is no longer accessible */
+ rproc->table_ptr = rproc->cached_table;
+
/* power off the remote processor */
ret = rproc->ops->stop(rproc);
if (ret) {