summaryrefslogtreecommitdiff
path: root/sound/soc/sof/intel/icl.c
diff options
context:
space:
mode:
authorPeter Ujfalusi <peter.ujfalusi@linux.intel.com>2022-04-21 23:20:31 +0300
committerMark Brown <broonie@kernel.org>2022-04-23 02:16:27 +0300
commit2a68ff846164922196c38718ad8dc216819ccd38 (patch)
treeeeb0c0871d53caa1b25be1bcbabfb0a61da8d359 /sound/soc/sof/intel/icl.c
parent95fa7a62e164630981c5f10d36c2967004f74237 (diff)
downloadlinux-2a68ff846164922196c38718ad8dc216819ccd38.tar.xz
ASoC: SOF: Intel: hda: Revisit IMR boot sequence
The sequence for IMR boot is essentially the same as normal boot with the difference that instead of DMA from host the firmware is loaded from IMR. Re-structure the code to use the existing sequence and also add fallback handling in case the IMR boot fails. Introduce a new flag to make the IMR boot support check simpler. Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20220421202031.1548362-1-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/sof/intel/icl.c')
-rw-r--r--sound/soc/sof/intel/icl.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/sound/soc/sof/intel/icl.c b/sound/soc/sof/intel/icl.c
index 8dd562696934..f845064c3589 100644
--- a/sound/soc/sof/intel/icl.c
+++ b/sound/soc/sof/intel/icl.c
@@ -56,11 +56,18 @@ static int icl_dsp_post_fw_run(struct snd_sof_dev *sdev)
int ret;
if (sdev->first_boot) {
+ struct sof_intel_hda_dev *hdev = sdev->pdata->hw_pdata;
+
ret = hda_sdw_startup(sdev);
if (ret < 0) {
dev_err(sdev->dev, "error: could not startup SoundWire links\n");
return ret;
}
+
+ /* Check if IMR boot is usable */
+ if (!sof_debug_check_flag(SOF_DBG_IGNORE_D3_PERSISTENT) &&
+ sdev->fw_ready.flags & SOF_IPC_INFO_D3_PERSISTENT)
+ hdev->imrboot_supported = true;
}
hda_sdw_int_enable(sdev, true);