Commit b490ddf2 authored by Shengjiu Wang's avatar Shengjiu Wang Committed by Mathieu Poirier
Browse files

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: c4c432df ("remoteproc: imx_dsp_rproc: Add support of recovery and coredump process")
Signed-off-by: default avatarShengjiu Wang <shengjiu.wang@nxp.com>
Reviewed-by: default avatarDaniel Baluta <daniel.baluta@nxp.com>
Reviewed-by: default avatarIuliana Prodan <iuliana.prodan@nxp.com>
Link: https://lore.kernel.org/r/20251218071750.2692132-1-shengjiu.wang@nxp.com


Signed-off-by: default avatarMathieu Poirier <mathieu.poirier@linaro.org>
parent 332c0327
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -1000,10 +1000,12 @@ static int imx_dsp_rproc_load(struct rproc *rproc, const struct firmware *fw)
	 * Clear buffers after pm rumtime for internal ocram is not
	 * accessible if power and clock are not enabled.
	 */
	if (rproc->state == RPROC_OFFLINE) {
		list_for_each_entry(carveout, &rproc->carveouts, node) {
			if (carveout->va)
				memset(carveout->va, 0, carveout->len);
		}
	}

	ret = imx_dsp_rproc_elf_load_segments(rproc, fw);
	if (ret)