ASoC: SOF: amd: Add psp_mbox_ready() and psp_send_cmd() callback
authorAjit Kumar Pandey <AjitKumar.Pandey@amd.com>
Thu, 21 Apr 2022 16:58:19 +0000 (11:58 -0500)
committerMark Brown <broonie@kernel.org>
Thu, 21 Apr 2022 17:25:17 +0000 (18:25 +0100)
commitbbdcd3d590cad744db46cb94649833db3575df49
tree9d0179a758929e20e3a7e43fde31ae5c21f3b565
parentd09a7db431c65aaa8303eb456439d1831ca2e6b4
ASoC: SOF: amd: Add psp_mbox_ready() and psp_send_cmd() callback

We need to ensure if PSP is mbox ready before and after sending cmd
to PSP over SMN interface. Add method to check MBOX_READY bit of PSP
with some delay over ACP_PSP_TIMEOUT_COUNTER. Replace psp_fw_validate
with new method psp_send_cmd() to send command via psp mailbox.

Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Ajit Kumar Pandey <AjitKumar.Pandey@amd.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20220421165820.337207-2-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/sof/amd/acp.c