summaryrefslogtreecommitdiff
path: root/sound/soc/fsl/fsl_dsp_audiomix.c
diff options
context:
space:
mode:
authorBing Song <bing.song@nxp.com>2020-07-09 13:54:58 +0800
committerBing Song <bing.song@nxp.com>2020-07-10 16:48:12 +0800
commit3e26378f5315cf77a49e86b7658442ac42f2bd1a (patch)
tree9f0dade9aa063b6db16db1f845dc79e4b8b13a0a /sound/soc/fsl/fsl_dsp_audiomix.c
parent3e415d0fadc13d42b2d6ec75701d2c16a1777723 (diff)
MLK-24365-11 dsp: wait DSP idle before close it.
Wait DSP to idle before gate OCRAM_A clock as FW code locate on OCRAM_A when LPA. Or DSP will hang. Signed-off-by: Bing Song <bing.song@nxp.com>
Diffstat (limited to 'sound/soc/fsl/fsl_dsp_audiomix.c')
-rw-r--r--sound/soc/fsl/fsl_dsp_audiomix.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/sound/soc/fsl/fsl_dsp_audiomix.c b/sound/soc/fsl/fsl_dsp_audiomix.c
index 679550ae857d..d86d70795846 100644
--- a/sound/soc/fsl/fsl_dsp_audiomix.c
+++ b/sound/soc/fsl/fsl_dsp_audiomix.c
@@ -54,6 +54,18 @@ bool imx_audiomix_dsp_reset(struct imx_audiomix_dsp_data *data)
}
EXPORT_SYMBOL(imx_audiomix_dsp_reset);
+bool imx_audiomix_dsp_pwaitmode(struct imx_audiomix_dsp_data *data)
+{
+ u32 val;
+
+ val = readl(data->base + AudioDSP_REG2);
+ if (val & AudioDSP_REG2_PWAITMODE)
+ return true;
+ else
+ return false;
+}
+EXPORT_SYMBOL(imx_audiomix_dsp_pwaitmode);
+
static int imx_audiomix_dsp_probe(struct platform_device *pdev)
{
struct imx_audiomix_dsp_data *drvdata;