Browse Source

ENGR00331799-4: ASoC: fsl_asrc: add spba clock support

asrc need to enable the spba clock, when sdma is using share peripheral
script. If don't enable it, may cause the read/write wrong data from/to
register.

Signed-off-by: Shengjiu Wang <shengjiu.wang@freescale.com>
isee-imx_3.14.28.y
Shengjiu Wang 6 years ago
committed by Nitin Garg
parent
commit
ecedd4b80b
2 changed files with 9 additions and 0 deletions
  1. +8
    -0
      sound/soc/fsl/fsl_asrc.c
  2. +1
    -0
      sound/soc/fsl/fsl_asrc.h

+ 8
- 0
sound/soc/fsl/fsl_asrc.c View File

@ -840,6 +840,12 @@ static int fsl_asrc_probe(struct platform_device *pdev)
return PTR_ERR(asrc_priv->ipg_clk);
}
asrc_priv->dma_clk = devm_clk_get(&pdev->dev, "dma");
if (IS_ERR(asrc_priv->dma_clk)) {
dev_err(&pdev->dev, "failed to get dma script clock\n");
return PTR_ERR(asrc_priv->dma_clk);
}
for (i = 0; i < ASRC_CLK_MAX_NUM; i++) {
sprintf(tmp, "asrck_%x", i);
asrc_priv->asrck_clk[i] = devm_clk_get(&pdev->dev, tmp);
@ -922,6 +928,7 @@ static int fsl_asrc_runtime_resume(struct device *dev)
clk_prepare_enable(asrc_priv->mem_clk);
clk_prepare_enable(asrc_priv->ipg_clk);
clk_prepare_enable(asrc_priv->dma_clk);
for (i = 0; i < ASRC_CLK_MAX_NUM; i++)
clk_prepare_enable(asrc_priv->asrck_clk[i]);
@ -935,6 +942,7 @@ static int fsl_asrc_runtime_suspend(struct device *dev)
for (i = 0; i < ASRC_CLK_MAX_NUM; i++)
clk_disable_unprepare(asrc_priv->asrck_clk[i]);
clk_disable_unprepare(asrc_priv->dma_clk);
clk_disable_unprepare(asrc_priv->ipg_clk);
clk_disable_unprepare(asrc_priv->mem_clk);


+ 1
- 0
sound/soc/fsl/fsl_asrc.h View File

@ -350,6 +350,7 @@ struct fsl_asrc {
unsigned long paddr;
struct clk *mem_clk;
struct clk *ipg_clk;
struct clk *dma_clk;
struct clk *asrck_clk[ASRC_CLK_MAX_NUM];
spinlock_t lock;


Loading…
Cancel
Save