diff options
author | Arnaud Pouliquen <arnaud.pouliquen@foss.st.com> | 2021-12-21 15:31:29 +0100 |
---|---|---|
committer | Mathieu Poirier <mathieu.poirier@linaro.org> | 2022-01-03 11:40:45 -0700 |
commit | cfcabbb24d5f4e52ce2e7797cbcfacd8fe932fb6 (patch) | |
tree | ea2d49c30fb0668da2a28647a22e17b469a779ce /drivers/remoteproc | |
parent | ba635863779871a4f873511199f3e0ae84d5e592 (diff) | |
download | linux-cfcabbb24d5f4e52ce2e7797cbcfacd8fe932fb6.tar.bz2 |
remoteproc: stm32: Improve crash recovery time
When a stop is requested on a crash, it is useless to try to shutdown it
gracefully, it is crashed.
In this case don't send the STM32_MBX_SHUTDOWN mailbox message that
will block the recovery during 500 ms, waiting an answer from the
coprocessor.
Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@foss.st.com>
Link: https://lore.kernel.org/r/20211221143129.18415-1-arnaud.pouliquen@foss.st.com
Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
Diffstat (limited to 'drivers/remoteproc')
-rw-r--r-- | drivers/remoteproc/stm32_rproc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/remoteproc/stm32_rproc.c b/drivers/remoteproc/stm32_rproc.c index b643efcf995a..7d782ed9e589 100644 --- a/drivers/remoteproc/stm32_rproc.c +++ b/drivers/remoteproc/stm32_rproc.c @@ -494,7 +494,7 @@ static int stm32_rproc_stop(struct rproc *rproc) int err, idx; /* request shutdown of the remote processor */ - if (rproc->state != RPROC_OFFLINE) { + if (rproc->state != RPROC_OFFLINE && rproc->state != RPROC_CRASHED) { idx = stm32_rproc_mbox_idx(rproc, STM32_MBX_SHUTDOWN); if (idx >= 0 && ddata->mb[idx].chan) { err = mbox_send_message(ddata->mb[idx].chan, "detach"); |