[PATCH 01/11] ASoC: SOF: Intel: MTL: remove redundant snd_sof_dsp_read() call

Pierre-Louis Bossart pierre-louis.bossart at linux.intel.com
Fri Jul 15 16:52:06 CEST 2022


From: Yong Zhi <yong.zhi at intel.com>

Drop redundant CPA bit check after polling the same condition.

Fixes: 064520e8aeaa ("ASoC: SOF: Intel: Add support for MeteorLake (MTL)")
Reviewed-by: Chao Song <chao.song at intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao at linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan at linux.intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi at linux.intel.com>
Signed-off-by: Yong Zhi <yong.zhi at intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart at linux.intel.com>
---
 sound/soc/sof/intel/mtl.c | 13 +------------
 1 file changed, 1 insertion(+), 12 deletions(-)

diff --git a/sound/soc/sof/intel/mtl.c b/sound/soc/sof/intel/mtl.c
index a5e244ea0688..96239ebb1eed 100644
--- a/sound/soc/sof/intel/mtl.c
+++ b/sound/soc/sof/intel/mtl.c
@@ -372,20 +372,9 @@ static int mtl_dsp_core_power_up(struct snd_sof_dev *sdev, int core)
 	ret = snd_sof_dsp_read_poll_timeout(sdev, HDA_DSP_BAR, MTL_DSP2CXCTL_PRIMARY_CORE, dspcxctl,
 					    (dspcxctl & cpa) == cpa, HDA_DSP_REG_POLL_INTERVAL_US,
 					    HDA_DSP_RESET_TIMEOUT_US);
-	if (ret < 0) {
+	if (ret < 0)
 		dev_err(sdev->dev, "%s: timeout on MTL_DSP2CXCTL_PRIMARY_CORE read\n",
 			__func__);
-		return ret;
-	}
-
-	/* did core power up ? */
-	dspcxctl = snd_sof_dsp_read(sdev, HDA_DSP_BAR, MTL_DSP2CXCTL_PRIMARY_CORE);
-	if ((dspcxctl & MTL_DSP2CXCTL_PRIMARY_CORE_CPA_MASK)
-		!= MTL_DSP2CXCTL_PRIMARY_CORE_CPA_MASK) {
-		dev_err(sdev->dev, "power up core failed core %d adspcs %#x\n",
-			core, dspcxctl);
-		ret = -EIO;
-	}
 
 	return ret;
 }
-- 
2.34.1



More information about the Alsa-devel mailing list