diff options
author | Bing Song <bing.song@nxp.com> | 2020-07-09 13:54:58 +0800 |
---|---|---|
committer | Bing Song <bing.song@nxp.com> | 2020-07-10 16:48:12 +0800 |
commit | 3e26378f5315cf77a49e86b7658442ac42f2bd1a (patch) | |
tree | 9f0dade9aa063b6db16db1f845dc79e4b8b13a0a /sound/soc/fsl/fsl_dsp_audiomix.c | |
parent | 3e415d0fadc13d42b2d6ec75701d2c16a1777723 (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.c | 12 |
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; |