summaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorAjye Huang <ajye_huang@compal.corp-partner.google.com>2022-12-05 17:36:48 +0530
committerMark Brown <broonie@kernel.org>2022-12-05 14:05:36 +0000
commit2a2f5f2384b9791a028901aac3f49c488839d073 (patch)
tree2e63655064e0f6156ad388672266807d8d6a91b5 /sound
parentf19a2caaab073873f673a41ce366ac898f34f543 (diff)
downloadlinux-2a2f5f2384b9791a028901aac3f49c488839d073.tar.bz2
ASoC: SOF: amd: Use poll function instead to read ACP_SHA_DSP_FW_QUALIFIER
The Skyrim project and Whiterun met error when DSP loading during device boot. Ex, error in kernel log, ERR kernel: [ 16.124537] snd_sof_amd_rembrandt 0000:04:00.5: PSP validation failed. Use the snd_sof_dsp_read_poll_timeout function to successfully read the FW_QUALIFIER register Signed-off-by: Ajye Huang <ajye_huang@compal.corp-partner.google.com> Signed-off-by: V sujith kumar Reddy <Vsujithkumar.Reddy@amd.com> Link: https://lore.kernel.org/r/20221205120649.1950576-2-Vsujithkumar.Reddy@amd.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/sof/amd/acp.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/sound/soc/sof/amd/acp.c b/sound/soc/sof/amd/acp.c
index 47115a77c92c..6bd2888fbb66 100644
--- a/sound/soc/sof/amd/acp.c
+++ b/sound/soc/sof/amd/acp.c
@@ -255,10 +255,12 @@ int configure_and_run_sha_dma(struct acp_dev_data *adata, void *image_addr,
if (ret)
return ret;
- fw_qualifier = snd_sof_dsp_read(sdev, ACP_DSP_BAR, ACP_SHA_DSP_FW_QUALIFIER);
- if (!(fw_qualifier & DSP_FW_RUN_ENABLE)) {
+ ret = snd_sof_dsp_read_poll_timeout(sdev, ACP_DSP_BAR, ACP_SHA_DSP_FW_QUALIFIER,
+ fw_qualifier, fw_qualifier & DSP_FW_RUN_ENABLE,
+ ACP_REG_POLL_INTERVAL, ACP_DMA_COMPLETE_TIMEOUT_US);
+ if (ret < 0) {
dev_err(sdev->dev, "PSP validation failed\n");
- return -EINVAL;
+ return ret;
}
return 0;