From c5e2eaa4f39abafda5983075355cd306e5c4387b Mon Sep 17 00:00:00 2001 From: Shengjiu Wang Date: Wed, 9 May 2018 11:12:02 +0800 Subject: [PATCH] MLK-18245-1: ASoC: fsl_dsp: remove the explicit power enablement The driver don't need to explicit enable the power domain, which can be done by runtime power management, when the power domain tree defined in device tree. in this case, the MU initialization can be moved to runtime pm function. Signed-off-by: Shengjiu Wang --- sound/soc/fsl/fsl_dsp.c | 20 +++++--------------- 1 file changed, 5 insertions(+), 15 deletions(-) diff --git a/sound/soc/fsl/fsl_dsp.c b/sound/soc/fsl/fsl_dsp.c index 7df05c7ef135..d71795ec4ba1 100644 --- a/sound/soc/fsl/fsl_dsp.c +++ b/sound/soc/fsl/fsl_dsp.c @@ -721,12 +721,6 @@ int dsp_mu_init(struct fsl_dsp *dsp_priv) return -EINVAL; } - if (!dsp_priv->dsp_mu_init) { - MU_Init(dsp_priv->mu_base_virtaddr); - MU_EnableRxFullInt(dsp_priv->mu_base_virtaddr, 0); - dsp_priv->dsp_mu_init = 1; - } - return ret; } @@ -913,10 +907,10 @@ static int fsl_dsp_runtime_resume(struct device *dev) struct xf_proxy *proxy = &dsp_priv->proxy; int ret; - if (sc_pm_set_resource_power_mode(dsp_priv->dsp_ipcHandle, - SC_R_DSP_RAM, SC_PM_PW_MODE_ON) != SC_ERR_NONE) { - dev_err(dev, "Error power on DSP RAM\n"); - return -EIO; + if (!dsp_priv->dsp_mu_init) { + MU_Init(dsp_priv->mu_base_virtaddr); + MU_EnableRxFullInt(dsp_priv->mu_base_virtaddr, 0); + dsp_priv->dsp_mu_init = 1; } if (!proxy->is_ready) { @@ -947,11 +941,7 @@ static int fsl_dsp_runtime_suspend(struct device *dev) struct fsl_dsp *dsp_priv = dev_get_drvdata(dev); struct xf_proxy *proxy = &dsp_priv->proxy; - if (sc_pm_set_resource_power_mode(dsp_priv->dsp_ipcHandle, - SC_R_DSP_RAM, SC_PM_PW_MODE_OFF) != SC_ERR_NONE) { - dev_err(dev, "Error power off DSP RAM\n"); - return -EIO; - } + dsp_priv->dsp_mu_init = 0; proxy->is_ready = 0; return 0; }