aboutsummaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>2019-08-12 15:05:02 -0400
committerMark Brown <broonie@kernel.org>2019-08-13 07:41:04 -0400
commit9c6c417d95d83999c16965186f6e755ad8a8b658 (patch)
tree70722a48f6dcf80c27a78c6de462f5ea12463514 /sound
parent8da2d74c10fd71cc04e2585fe8bb3ced325f8e25 (diff)
ASoC: SOF: fix HDA direct MMIO access
The recent change to remove the bus->io_ops callbacks used an older version of the SOF code base, and when merged into Mark's for-next it invalidated changes, resulting in broken compilation identified by kbuild and reproduced during the weekly SOF rebase. Restore SOF code overridden by git merge and apply Takashi's intended change in the 'right' location. Fixes: c2f16a94a8049 ("Merge branch 'topic/hda-bus-ops-cleanup'") Reported-by: kbuild test robot <lkp@intel.com> Cc: Takashi Iwai <tiwai@suse.de> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20190812190502.30729-1-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/sof/intel/hda-ctrl.c2
-rw-r--r--sound/soc/sof/intel/hda-dsp.c39
2 files changed, 1 insertions, 40 deletions
diff --git a/sound/soc/sof/intel/hda-ctrl.c b/sound/soc/sof/intel/hda-ctrl.c
index a7fee403cb90..bc41028a7a01 100644
--- a/sound/soc/sof/intel/hda-ctrl.c
+++ b/sound/soc/sof/intel/hda-ctrl.c
@@ -254,7 +254,7 @@ int hda_dsp_ctrl_init_chip(struct snd_sof_dev *sdev, bool full_reset)
254#if IS_ENABLED(CONFIG_SND_SOC_SOF_HDA) 254#if IS_ENABLED(CONFIG_SND_SOC_SOF_HDA)
255 /* Reset stream-to-link mapping */ 255 /* Reset stream-to-link mapping */
256 list_for_each_entry(hlink, &bus->hlink_list, list) 256 list_for_each_entry(hlink, &bus->hlink_list, list)
257 bus->io_ops->reg_writel(0, hlink->ml_addr + AZX_REG_ML_LOSIDV); 257 writel(0, hlink->ml_addr + AZX_REG_ML_LOSIDV);
258#endif 258#endif
259 259
260 bus->chip_init = true; 260 bus->chip_init = true;
diff --git a/sound/soc/sof/intel/hda-dsp.c b/sound/soc/sof/intel/hda-dsp.c
index 097727cda5cb..fb55a3c5afd0 100644
--- a/sound/soc/sof/intel/hda-dsp.c
+++ b/sound/soc/sof/intel/hda-dsp.c
@@ -354,45 +354,6 @@ static int hda_resume(struct snd_sof_dev *sdev, bool runtime_resume)
354 return ret; 354 return ret;
355 } 355 }
356 356
357 hda_dsp_ctrl_misc_clock_gating(sdev, false);
358
359 /* Reset stream-to-link mapping */
360 list_for_each_entry(hlink, &bus->hlink_list, list)
361 writel(0, hlink->ml_addr + AZX_REG_ML_LOSIDV);
362
363 hda_dsp_ctrl_misc_clock_gating(sdev, true);
364#else
365
366 hda_dsp_ctrl_misc_clock_gating(sdev, false);
367
368 /* reset controller */
369 ret = hda_dsp_ctrl_link_reset(sdev, true);
370 if (ret < 0) {
371 dev_err(sdev->dev,
372 "error: failed to reset controller during resume\n");
373 return ret;
374 }
375
376 /* take controller out of reset */
377 ret = hda_dsp_ctrl_link_reset(sdev, false);
378 if (ret < 0) {
379 dev_err(sdev->dev,
380 "error: failed to ready controller during resume\n");
381 return ret;
382 }
383
384 /* enable hda bus irq */
385 snd_sof_dsp_update_bits(sdev, HDA_DSP_HDA_BAR, SOF_HDA_INTCTL,
386 SOF_HDA_INT_CTRL_EN | SOF_HDA_INT_GLOBAL_EN,
387 SOF_HDA_INT_CTRL_EN | SOF_HDA_INT_GLOBAL_EN);
388
389 hda_dsp_ctrl_misc_clock_gating(sdev, true);
390#endif
391
392 /* enable ppcap interrupt */
393 hda_dsp_ctrl_ppcap_enable(sdev, true);
394 hda_dsp_ctrl_ppcap_int_enable(sdev, true);
395
396#if IS_ENABLED(CONFIG_SND_SOC_SOF_HDA) 357#if IS_ENABLED(CONFIG_SND_SOC_SOF_HDA)
397 /* check jack status */ 358 /* check jack status */
398 if (runtime_resume) 359 if (runtime_resume)