diff options
author | Fabien Dessenne <fabien.dessenne@st.com> | 2019-08-26 17:38:06 +0200 |
---|---|---|
committer | Bjorn Andersson <bjorn.andersson@linaro.org> | 2019-08-26 23:52:26 +0200 |
commit | abbe429d56168b90c03bc548403d72505e4fd6b2 (patch) | |
tree | 148da9574efb42e93b80b2e915ae31df1b683891 /drivers/remoteproc/stm32_rproc.c | |
parent | remoteproc: qcom: q6v5-mss: fixup q6v5_pds_enable error handling (diff) | |
download | linux-abbe429d56168b90c03bc548403d72505e4fd6b2.tar.xz linux-abbe429d56168b90c03bc548403d72505e4fd6b2.zip |
remoteproc: stm32: clear MCU PDDS at firmware start
When remoteproc stops a firmware, it sets the MCU PDDS flag, allowing
the platform to reach the Standby power mode if needed.
Symmetrically, clear this flag before running a firmware.
This fixes the issue where the system goes to Standby mode when the
MCU crashes while MPU is in CSTOP mode.
Signed-off-by: Fabien Dessenne <fabien.dessenne@st.com>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Diffstat (limited to 'drivers/remoteproc/stm32_rproc.c')
-rw-r--r-- | drivers/remoteproc/stm32_rproc.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/remoteproc/stm32_rproc.c b/drivers/remoteproc/stm32_rproc.c index e2da7198b65f..1c959131d796 100644 --- a/drivers/remoteproc/stm32_rproc.c +++ b/drivers/remoteproc/stm32_rproc.c @@ -383,10 +383,21 @@ static void stm32_rproc_add_coredump_trace(struct rproc *rproc) static int stm32_rproc_start(struct rproc *rproc) { + struct stm32_rproc *ddata = rproc->priv; int err; stm32_rproc_add_coredump_trace(rproc); + /* clear remote proc Deep Sleep */ + if (ddata->pdds.map) { + err = regmap_update_bits(ddata->pdds.map, ddata->pdds.reg, + ddata->pdds.mask, 0); + if (err) { + dev_err(&rproc->dev, "failed to clear pdds\n"); + return err; + } + } + err = stm32_rproc_set_hold_boot(rproc, false); if (err) return err; |