提交 efd86262 编写于 作者: M Mathieu Poirier 提交者: Bjorn Andersson

remoteproc: stm32: Update M4 state in stm32_rproc_stop()

Update the co-processor state in function stm32_rproc_stop() so that
it can be used in scenarios where the remoteproc core is attaching
to the M4.

Mainly based on the work published by Arnaud Pouliquen [1].

[1]. https://patchwork.kernel.org/project/linux-remoteproc/list/?series=239877Acked-by: NArnaud Pouliquen <arnaud.pouliquen@st.com>
Signed-off-by: NMathieu Poirier <mathieu.poirier@linaro.org>
Reviewed-by: NArnaud Pouliquen <arnaud.pouliquen@st.com>
Link: https://lore.kernel.org/r/20200714200445.1427257-12-mathieu.poirier@linaro.orgSigned-off-by: NBjorn Andersson <bjorn.andersson@linaro.org>
上级 bee04d46
......@@ -504,6 +504,18 @@ static int stm32_rproc_stop(struct rproc *rproc)
}
}
/* update coprocessor state to OFF if available */
if (ddata->m4_state.map) {
err = regmap_update_bits(ddata->m4_state.map,
ddata->m4_state.reg,
ddata->m4_state.mask,
M4_STATE_OFF);
if (err) {
dev_err(&rproc->dev, "failed to set copro state\n");
return err;
}
}
return 0;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册