From dd53cbb0fdddeebd3526e42e0cdc9d393670671b Mon Sep 17 00:00:00 2001 From: Daniel Baluta Date: Thu, 18 Jun 2020 21:15:28 +0300 Subject: MLK-24263-7 ASoC: fsl_dsp_audiomix: Introduce imx_audiomix_dsp_stall This function is used to stall the DSP and it will be used together with PWRCTL register in order to properly reset the DSP to handle the Power Management use case. Signed-off-by: Daniel Baluta Reviewed-by: Shengjiu Wang --- sound/soc/fsl/fsl_dsp_audiomix.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'sound/soc/fsl/fsl_dsp_audiomix.c') diff --git a/sound/soc/fsl/fsl_dsp_audiomix.c b/sound/soc/fsl/fsl_dsp_audiomix.c index ba7730b54cd2..679550ae857d 100644 --- a/sound/soc/fsl/fsl_dsp_audiomix.c +++ b/sound/soc/fsl/fsl_dsp_audiomix.c @@ -26,6 +26,16 @@ void imx_audiomix_dsp_start(struct imx_audiomix_dsp_data *data) } EXPORT_SYMBOL(imx_audiomix_dsp_start); +void imx_audiomix_dsp_stall(struct imx_audiomix_dsp_data *data) +{ + u32 val; + + val = readl(data->base + AudioDSP_REG2); + val |= AudioDSP_REG2_RUNSTALL; + writel(val, data->base + AudioDSP_REG2); +} +EXPORT_SYMBOL(imx_audiomix_dsp_stall); + void imx_audiomix_dsp_pid_set(struct imx_audiomix_dsp_data *data, u32 val) { writel(val, data->base + AudioDSP_REG3); -- cgit v1.2.3