Commit e2406275 authored by Peter Ujfalusi's avatar Peter Ujfalusi Committed by Mark Brown

ASoC: SOF: Set SOF_FW_BOOT_FAILED in case we have failure during boot

Change the fw_state to SOF_FW_BOOT_FAILED if we encountered an error during
booting the firmware.
Signed-off-by: default avatarPeter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: default avatarPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: default avatarBard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: default avatarRanjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://lore.kernel.org/r/20211223113628.18582-13-peter.ujfalusi@linux.intel.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent 9421ff76
......@@ -202,6 +202,7 @@ static int sof_probe_continue(struct snd_sof_dev *sdev)
if (ret < 0) {
dev_err(sdev->dev, "error: failed to load DSP firmware %d\n",
ret);
sof_set_fw_state(sdev, SOF_FW_BOOT_FAILED);
goto fw_load_err;
}
......@@ -215,6 +216,7 @@ static int sof_probe_continue(struct snd_sof_dev *sdev)
if (ret < 0) {
dev_err(sdev->dev, "error: failed to boot DSP firmware %d\n",
ret);
sof_set_fw_state(sdev, SOF_FW_BOOT_FAILED);
goto fw_run_err;
}
......
......@@ -838,7 +838,6 @@ int snd_sof_run_firmware(struct snd_sof_dev *sdev)
snd_sof_dsp_dbg_dump(sdev, "Firmware boot failure due to timeout",
SOF_DBG_DUMP_REGS | SOF_DBG_DUMP_MBOX |
SOF_DBG_DUMP_TEXT | SOF_DBG_DUMP_PCI);
sof_set_fw_state(sdev, SOF_FW_BOOT_FAILED);
return -EIO;
}
......
......@@ -130,6 +130,7 @@ static int sof_resume(struct device *dev, bool runtime_resume)
dev_err(sdev->dev,
"error: failed to load DSP firmware after resume %d\n",
ret);
sof_set_fw_state(sdev, SOF_FW_BOOT_FAILED);
return ret;
}
......@@ -144,6 +145,7 @@ static int sof_resume(struct device *dev, bool runtime_resume)
dev_err(sdev->dev,
"error: failed to boot DSP firmware after resume %d\n",
ret);
sof_set_fw_state(sdev, SOF_FW_BOOT_FAILED);
return ret;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment