Skip to content

Commit b490ddf

Browse files
TE-N-ShengjiuWangmathieupoirier
authored andcommitted
remoteproc: imx_dsp_rproc: Only reset carveout memory at RPROC_OFFLINE state
Do not reset memory at suspend and resume stage, because some memory is used to save the software state for resume, if it is cleared, the resume operation can fail. Fixes: c4c432d ("remoteproc: imx_dsp_rproc: Add support of recovery and coredump process") Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com> Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com> Reviewed-by: Iuliana Prodan <iuliana.prodan@nxp.com> Link: https://lore.kernel.org/r/20251218071750.2692132-1-shengjiu.wang@nxp.com Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
1 parent 332c032 commit b490ddf

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

drivers/remoteproc/imx_dsp_rproc.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1000,9 +1000,11 @@ static int imx_dsp_rproc_load(struct rproc *rproc, const struct firmware *fw)
10001000
* Clear buffers after pm rumtime for internal ocram is not
10011001
* accessible if power and clock are not enabled.
10021002
*/
1003-
list_for_each_entry(carveout, &rproc->carveouts, node) {
1004-
if (carveout->va)
1005-
memset(carveout->va, 0, carveout->len);
1003+
if (rproc->state == RPROC_OFFLINE) {
1004+
list_for_each_entry(carveout, &rproc->carveouts, node) {
1005+
if (carveout->va)
1006+
memset(carveout->va, 0, carveout->len);
1007+
}
10061008
}
10071009

10081010
ret = imx_dsp_rproc_elf_load_segments(rproc, fw);

0 commit comments

Comments
 (0)