summaryrefslogtreecommitdiff
path: root/sound/soc/fsl/fsl_dsp_audiomix.c
diff options
context:
space:
mode:
authorShengjiu Wang <shengjiu.wang@nxp.com>2020-05-11 13:17:12 +0800
committerShengjiu Wang <shengjiu.wang@nxp.com>2020-05-11 14:50:55 +0800
commitcacd4e1389be6e70bf95a82ececb4a2d9e53653e (patch)
tree7b80aaaed9b55d07fbabc80a393821958486e917 /sound/soc/fsl/fsl_dsp_audiomix.c
parentf25b74f7853295798fb0a7c0f3e9e783f53f65f8 (diff)
MLK-23970: ASoC: fsl_dsp: workaround for no reset controller
On imx8mp, there is no dedicated reset controller for DSP and there is no dedicated power domain for DSP. The power of DSP is bound with audiomix, so we need to check the DSP status for judging the audiomix is reset or not. We use the PID register for status check, after reset, it will be set to zero, when DSP is used we set it to 1. Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com> Reviewed-by: Peng Zhang <peng.zhang_8@nxp.com> Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com>
Diffstat (limited to 'sound/soc/fsl/fsl_dsp_audiomix.c')
-rw-r--r--sound/soc/fsl/fsl_dsp_audiomix.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/sound/soc/fsl/fsl_dsp_audiomix.c b/sound/soc/fsl/fsl_dsp_audiomix.c
index 91e74d17ff2b..20a76d424500 100644
--- a/sound/soc/fsl/fsl_dsp_audiomix.c
+++ b/sound/soc/fsl/fsl_dsp_audiomix.c
@@ -26,6 +26,24 @@ void imx_audiomix_dsp_start(struct imx_audiomix_dsp_data *data)
}
EXPORT_SYMBOL(imx_audiomix_dsp_start);
+void imx_audiomix_dsp_pid_set(struct imx_audiomix_dsp_data *data, u32 val)
+{
+ writel(val, data->base + AudioDSP_REG3);
+}
+EXPORT_SYMBOL(imx_audiomix_dsp_pid_set);
+
+bool imx_audiomix_dsp_reset(struct imx_audiomix_dsp_data *data)
+{
+ u32 val;
+
+ val = readl(data->base + AudioDSP_REG3);
+ if (val == 0)
+ return true;
+ else
+ return false;
+}
+EXPORT_SYMBOL(imx_audiomix_dsp_reset);
+
static int imx_audiomix_dsp_probe(struct platform_device *pdev)
{
struct imx_audiomix_dsp_data *drvdata;