summaryrefslogtreecommitdiffstats
path: root/sound/soc/intel/skylake/cnl-sst.c
diff options
context:
space:
mode:
authorCezary Rojewski <cezary.rojewski@intel.com>2019-06-13 21:04:32 +0200
committerMark Brown <broonie@kernel.org>2019-06-25 16:33:39 +0200
commit078759399ff74e2e6f5e208c61924d1b7d66e5d8 (patch)
tree51e7b070bfea1ca24354a9bc75aacb880a043ffb /sound/soc/intel/skylake/cnl-sst.c
parentASoC: topology: Consolidate and fix asoc_tplg_dapm_widget_*_create flow (diff)
downloadlinux-078759399ff74e2e6f5e208c61924d1b7d66e5d8.tar.xz
linux-078759399ff74e2e6f5e208c61924d1b7d66e5d8.zip
ASoC: Intel: Skylake: Read HIPCT extension before clearing DONE bit
Host clears DONE bit to signal IPC target it has completed the operation. Once this is done, IPC target i.e. DSP may proceed with the next reply, filling registers with new portion of data. Because of this, host should always read all registers prior to clearing DONE and BUSY bits to ensure no desynchronization happens the time in between clearing bits and reading message data (here, extension). Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/intel/skylake/cnl-sst.c')
-rw-r--r--sound/soc/intel/skylake/cnl-sst.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/soc/intel/skylake/cnl-sst.c b/sound/soc/intel/skylake/cnl-sst.c
index 245df1067ba8..759ea59615ca 100644
--- a/sound/soc/intel/skylake/cnl-sst.c
+++ b/sound/soc/intel/skylake/cnl-sst.c
@@ -313,6 +313,7 @@ static irqreturn_t cnl_dsp_irq_thread_handler(int irq, void *context)
hipcida = sst_dsp_shim_read_unlocked(dsp, CNL_ADSP_REG_HIPCIDA);
hipctdr = sst_dsp_shim_read_unlocked(dsp, CNL_ADSP_REG_HIPCTDR);
+ hipctdd = sst_dsp_shim_read_unlocked(dsp, CNL_ADSP_REG_HIPCTDD);
/* reply message from dsp */
if (hipcida & CNL_ADSP_REG_HIPCIDA_DONE) {
@@ -332,7 +333,6 @@ static irqreturn_t cnl_dsp_irq_thread_handler(int irq, void *context)
/* new message from dsp */
if (hipctdr & CNL_ADSP_REG_HIPCTDR_BUSY) {
- hipctdd = sst_dsp_shim_read_unlocked(dsp, CNL_ADSP_REG_HIPCTDD);
header.primary = hipctdr;
header.extension = hipctdd;
dev_dbg(dsp->dev, "IPC irq: Firmware respond primary:%x",