remoteproc: Support attach recovery after rproc crash
authorPeng Fan <peng.fan@nxp.com>
Wed, 28 Sep 2022 06:47:56 +0000 (14:47 +0800)
committerMathieu Poirier <mathieu.poirier@linaro.org>
Wed, 28 Sep 2022 16:47:07 +0000 (10:47 -0600)
commitba194232edc032be2188ed792330bdd7bd5d4363
tree1565c76fc5fa0035de3559c1cd07900446c4f8ab
parent49f27f2b4bfa8b6e26f02df615e544f52648bfb2
remoteproc: Support attach recovery after rproc crash

Current logic only support main processor to stop/start the remote
processor after crash. However to SoC, such as i.MX8QM/QXP, the
remote processor could do attach recovery after crash and trigger watchdog
to reboot itself. It does not need main processor to load image, or
stop/start remote processor.

Introduce two functions: rproc_attach_recovery, rproc_boot_recovery
for the two cases. Boot recovery is as before, let main processor to
help recovery, while attach recovery is to recover itself without help.
To attach recovery, we only do detach and attach.

Acked-by: Arnaud Pouliquen <arnaud.pouliquen@foss.st.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Link: https://lore.kernel.org/r/20220928064756.4059662-3-peng.fan@oss.nxp.com
Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
drivers/remoteproc/remoteproc_core.c