@@ -1678,20 +1678,23 @@ int rproc_trigger_recovery(struct rproc *rproc)
if (ret)
goto unlock_mutex;
- /* generate coredump */
- rproc_coredump(rproc);
+ if (!rproc->skip_fw_load_recovery) {
+ /* 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_recovery)
+ release_firmware(firmware_p);
unlock_mutex:
mutex_unlock(&rproc->lock);
@@ -514,6 +514,7 @@ struct rproc {
bool has_iommu;
bool auto_boot;
bool skip_fw_load;
+ bool skip_fw_load_recovery;
struct list_head dump_segments;
int nb_vdev;
};