summaryrefslogtreecommitdiff
path: root/sound/soc/sof/intel
diff options
context:
space:
mode:
authorPeter Ujfalusi <peter.ujfalusi@linux.intel.com>2022-07-12 15:57:33 +0300
committerMark Brown <broonie@kernel.org>2022-08-23 14:10:01 +0100
commit43a03d247091e1fcd3065dae3407b959e8921c16 (patch)
tree0a891d1d4613a5f0cb6a56b5c8493f87a1964fbb /sound/soc/sof/intel
parent94f072748337424c9cf92cd018532a34db3a5516 (diff)
ASoC: SOF: Intel: hda-loader: Use the FSR state definitions during bootup
Switch to use the newly added FSR (Firmware State Register) definitions for DSP state handling and targeting. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Rander Wang <rander.wang@intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Link: https://lore.kernel.org/r/20220712125734.30512-3-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/sof/intel')
-rw-r--r--sound/soc/sof/intel/hda-loader.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/sound/soc/sof/intel/hda-loader.c b/sound/soc/sof/intel/hda-loader.c
index eb22eb3f6fee..98812d51b31c 100644
--- a/sound/soc/sof/intel/hda-loader.c
+++ b/sound/soc/sof/intel/hda-loader.c
@@ -177,14 +177,13 @@ int cl_dsp_init(struct snd_sof_dev *sdev, int stream_tag, bool imr_boot)
* - IMR boot: wait for ROM firmware entered (firmware booted up from IMR)
*/
if (imr_boot)
- target_status = HDA_DSP_ROM_FW_ENTERED;
+ target_status = FSR_STATE_FW_ENTERED;
else
- target_status = HDA_DSP_ROM_INIT;
+ target_status = FSR_STATE_INIT_DONE;
ret = snd_sof_dsp_read_poll_timeout(sdev, HDA_DSP_BAR,
chip->rom_status_reg, status,
- ((status & HDA_DSP_ROM_STS_MASK)
- == target_status),
+ (FSR_TO_STATE_CODE(status) == target_status),
HDA_DSP_REG_POLL_INTERVAL_US,
chip->rom_init_timeout *
USEC_PER_MSEC);
@@ -292,8 +291,7 @@ int hda_cl_copy_fw(struct snd_sof_dev *sdev, struct hdac_ext_stream *hext_stream
status = snd_sof_dsp_read_poll_timeout(sdev, HDA_DSP_BAR,
chip->rom_status_reg, reg,
- ((reg & HDA_DSP_ROM_STS_MASK)
- == HDA_DSP_ROM_FW_ENTERED),
+ (FSR_TO_STATE_CODE(reg) == FSR_STATE_FW_ENTERED),
HDA_DSP_REG_POLL_INTERVAL_US,
HDA_DSP_BASEFW_TIMEOUT_US);