Commit f747eb86 authored by Yong Zhi's avatar Yong Zhi Committed by Mark Brown

ASoC: SOF: Intel: MTL: conditionally wake WPIO1PG domain

Wake IO1 from power gating if there is SoundWire enabled link discovered
by ACPI scan.
Signed-off-by: default avatarYong Zhi <yong.zhi@intel.com>
Signed-off-by: default avatarPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: default avatarRanjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: default avatarPéter Ujfalusi <peter.ujfalusi@linux.intel.com>
Link: https://lore.kernel.org/r/20230406154454.18163-1-pierre-louis.bossart@linux.intel.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent a7fe7e24
...@@ -217,6 +217,7 @@ static int mtl_enable_interrupts(struct snd_sof_dev *sdev, bool enable) ...@@ -217,6 +217,7 @@ static int mtl_enable_interrupts(struct snd_sof_dev *sdev, bool enable)
/* pre fw run operations */ /* pre fw run operations */
static int mtl_dsp_pre_fw_run(struct snd_sof_dev *sdev) static int mtl_dsp_pre_fw_run(struct snd_sof_dev *sdev)
{ {
struct sof_intel_hda_dev *hdev = sdev->pdata->hw_pdata;
u32 dsphfpwrsts; u32 dsphfpwrsts;
u32 dsphfdsscs; u32 dsphfdsscs;
u32 cpa; u32 cpa;
...@@ -255,9 +256,11 @@ static int mtl_dsp_pre_fw_run(struct snd_sof_dev *sdev) ...@@ -255,9 +256,11 @@ static int mtl_dsp_pre_fw_run(struct snd_sof_dev *sdev)
if (ret < 0) if (ret < 0)
dev_err(sdev->dev, "failed to power up gated DSP domain\n"); dev_err(sdev->dev, "failed to power up gated DSP domain\n");
/* make sure SoundWire is not power-gated */ /* if SoundWire is used, make sure it is not power-gated */
snd_sof_dsp_update_bits(sdev, HDA_DSP_BAR, MTL_HFPWRCTL, if (hdev->info.handle && hdev->info.link_mask > 0)
MTL_HfPWRCTL_WPIOXPG(1), MTL_HfPWRCTL_WPIOXPG(1)); snd_sof_dsp_update_bits(sdev, HDA_DSP_BAR, MTL_HFPWRCTL,
MTL_HfPWRCTL_WPIOXPG(1), MTL_HfPWRCTL_WPIOXPG(1));
return ret; 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