aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/omap
diff options
context:
space:
mode:
authorPeter Ujfalusi <peter.ujfalusi@ti.com>2012-03-05 04:32:27 -0500
committerLiam Girdwood <lrg@ti.com>2012-03-12 09:34:23 -0400
commite386615c01d37145aa27fd06d1f8de26f1acbb7f (patch)
tree8243ee27e3d3da22ce796210425102b25352ff6c /sound/soc/omap
parent08905d8ab4d4a264c5a700b04b9cbafe4f381037 (diff)
ASoC: omap-mcbsp: When closing the port select PRCM source for CLKS signal
If external source for the CLKS signal selection kept after the port is no longer in use the system might refuse to go suspend. There is also a chance that the external clock is not running when next time the McBSP port is started which can result errors when we try to access McBSP registers. Reset the CLKS source back to PRCM source unconditionally. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Tested-by: Grazvydas Ignotas <notasas@gmail.com> Signed-off-by: Liam Girdwood <lrg@ti.com>
Diffstat (limited to 'sound/soc/omap')
-rw-r--r--sound/soc/omap/mcbsp.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/sound/soc/omap/mcbsp.c b/sound/soc/omap/mcbsp.c
index d7167932113a..21dbb0532bca 100644
--- a/sound/soc/omap/mcbsp.c
+++ b/sound/soc/omap/mcbsp.c
@@ -548,6 +548,16 @@ void omap_mcbsp_free(struct omap_mcbsp *mcbsp)
548 548
549 reg_cache = mcbsp->reg_cache; 549 reg_cache = mcbsp->reg_cache;
550 550
551 /*
552 * Select CLKS source from internal source unconditionally before
553 * marking the McBSP port as free.
554 * If the external clock source via MCBSP_CLKS pin has been selected the
555 * system will refuse to enter idle if the CLKS pin source is not reset
556 * back to internal source.
557 */
558 if (!cpu_class_is_omap1())
559 omap2_mcbsp_set_clks_src(mcbsp, MCBSP_CLKS_PRCM_SRC);
560
551 spin_lock(&mcbsp->lock); 561 spin_lock(&mcbsp->lock);
552 if (mcbsp->free) 562 if (mcbsp->free)
553 dev_err(mcbsp->dev, "McBSP%d was not reserved\n", mcbsp->id); 563 dev_err(mcbsp->dev, "McBSP%d was not reserved\n", mcbsp->id);