summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorPeng Fan <peng.fan@nxp.com>2020-02-19 15:27:39 +0800
committerPeng Fan <peng.fan@nxp.com>2020-04-09 10:35:38 +0800
commiteb225e1d92f46b07dbce5e6acbb3302542d63ee7 (patch)
tree68041ac313fe76aad6b4e90d39fa3aca64fd16b9 /drivers
parent44ff0e88bfd7a7addc850fd4d6a7bf60c36314d3 (diff)
MLK-23754-5 remoteproc: add support to skip firmware load when recovery
Remote processor such as M4 inside i.MX8QXP is not handled by Linux when it is configured to run inside its own hardware partition by system control unit(SCU). So even remote processor crash reset, it is handled by SCU, not linux. To such case, firmware load should be ignored, So need skip_fw_load when m4 reboot itself. Reviewed-by: Richard Zhu <hongxing.zhu@nxp.com> Signed-off-by: Peng Fan <peng.fan@nxp.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/remoteproc/remoteproc_core.c19
1 files changed, 11 insertions, 8 deletions
diff --git a/drivers/remoteproc/remoteproc_core.c b/drivers/remoteproc/remoteproc_core.c
index 0069d53bab50..fa08cbcfcbf7 100644
--- a/drivers/remoteproc/remoteproc_core.c
+++ b/drivers/remoteproc/remoteproc_core.c
@@ -1679,20 +1679,23 @@ int rproc_trigger_recovery(struct rproc *rproc)
if (ret)
goto unlock_mutex;
- /* generate coredump */
- rproc_coredump(rproc);
+ if (!rproc->skip_fw_load) {
+ /* generate coredump */
+ rproc_coredump(rproc);
- /* load firmware */
- ret = request_firmware(&firmware_p, rproc->firmware, dev);
- if (ret < 0) {
- dev_err(dev, "request_firmware failed: %d\n", ret);
- goto unlock_mutex;
+ /* load firmware */
+ ret = request_firmware(&firmware_p, rproc->firmware, dev);
+ if (ret < 0) {
+ dev_err(dev, "request_firmware failed: %d\n", ret);
+ goto unlock_mutex;
+ }
}
/* boot the remote processor up again */
ret = rproc_start(rproc, firmware_p);
- release_firmware(firmware_p);
+ if (!rproc->skip_fw_load)
+ release_firmware(firmware_p);
unlock_mutex:
mutex_unlock(&rproc->lock);