aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/fsl
diff options
context:
space:
mode:
authorShengjiu Wang <b02247@freescale.com>2014-04-27 22:59:28 -0400
committerShengjiu Wang <b02247@freescale.com>2014-04-29 00:42:53 -0400
commit0673acf93a40e5b26b667b627dc62b81b377cc70 (patch)
tree7b78018b0dfaccad18f39c65761e1f3c8834f871 /sound/soc/fsl
parentc626c77caa8d381254b24556ac78a96ab2936937 (diff)
ENGR00310878-1 Asoc: fsl: refine clock tree for ESAI
There are three clock for ESAI, esai_extal, esai_ipg, esai_mem. Make the clock for ESAI more clear. Signed-off-by: Shengjiu Wang <b02247@freescale.com>
Diffstat (limited to 'sound/soc/fsl')
-rw-r--r--sound/soc/fsl/fsl_esai.c9
-rw-r--r--sound/soc/fsl/fsl_esai.h1
2 files changed, 10 insertions, 0 deletions
diff --git a/sound/soc/fsl/fsl_esai.c b/sound/soc/fsl/fsl_esai.c
index 762ac316fa32..0f9282cc5acf 100644
--- a/sound/soc/fsl/fsl_esai.c
+++ b/sound/soc/fsl/fsl_esai.c
@@ -314,6 +314,7 @@ static int fsl_esai_startup(struct snd_pcm_substream *substream,
314 314
315 clk_enable(esai->clk); 315 clk_enable(esai->clk);
316 clk_prepare_enable(esai->dmaclk); 316 clk_prepare_enable(esai->dmaclk);
317 clk_prepare_enable(esai->extalclk);
317 318
318 esai->substream[substream->stream] = substream; 319 esai->substream[substream->stream] = substream;
319 320
@@ -474,6 +475,7 @@ static void fsl_esai_shutdown(struct snd_pcm_substream *substream,
474 475
475 esai->substream[substream->stream] = NULL; 476 esai->substream[substream->stream] = NULL;
476 477
478 clk_disable_unprepare(esai->extalclk);
477 clk_disable_unprepare(esai->dmaclk); 479 clk_disable_unprepare(esai->dmaclk);
478 clk_disable(esai->clk); 480 clk_disable(esai->clk);
479} 481}
@@ -774,6 +776,13 @@ static int fsl_esai_probe(struct platform_device *pdev)
774 goto failed_get_resource; 776 goto failed_get_resource;
775 } 777 }
776 778
779 esai->extalclk = devm_clk_get(&pdev->dev, "extal");
780 if (IS_ERR(esai->extalclk)) {
781 ret = PTR_ERR(esai->extalclk);
782 dev_err(&pdev->dev, "Cannot get extal clock: %d\n", ret);
783 goto failed_get_resource;
784 }
785
777 ret = of_address_to_resource(np, 0, &res); 786 ret = of_address_to_resource(np, 0, &res);
778 if (ret) { 787 if (ret) {
779 dev_err(&pdev->dev, "could not determine device resources\n"); 788 dev_err(&pdev->dev, "could not determine device resources\n");
diff --git a/sound/soc/fsl/fsl_esai.h b/sound/soc/fsl/fsl_esai.h
index daf080641277..b2551c530782 100644
--- a/sound/soc/fsl/fsl_esai.h
+++ b/sound/soc/fsl/fsl_esai.h
@@ -320,6 +320,7 @@
320struct fsl_esai { 320struct fsl_esai {
321 struct clk *clk; 321 struct clk *clk;
322 struct clk *dmaclk; 322 struct clk *dmaclk;
323 struct clk *extalclk;
323 void __iomem *base; 324 void __iomem *base;
324 int irq; 325 int irq;
325 unsigned int flags; 326 unsigned int flags;