Commit 2a2f5f23 authored by Ajye Huang's avatar Ajye Huang Committed by Mark Brown

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: default avatarAjye Huang <ajye_huang@compal.corp-partner.google.com>
Signed-off-by: default avatarV sujith kumar Reddy <Vsujithkumar.Reddy@amd.com>
Link: https://lore.kernel.org/r/20221205120649.1950576-2-Vsujithkumar.Reddy@amd.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent f19a2caa
......@@ -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;
......
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