提交 e386615c 编写于 作者: P Peter Ujfalusi 提交者: Liam Girdwood

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: NPeter Ujfalusi <peter.ujfalusi@ti.com>
Acked-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
Tested-by: NGrazvydas Ignotas <notasas@gmail.com>
Signed-off-by: NLiam Girdwood <lrg@ti.com>
上级 08905d8a
...@@ -548,6 +548,16 @@ void omap_mcbsp_free(struct omap_mcbsp *mcbsp) ...@@ -548,6 +548,16 @@ void omap_mcbsp_free(struct omap_mcbsp *mcbsp)
reg_cache = mcbsp->reg_cache; reg_cache = mcbsp->reg_cache;
/*
* Select CLKS source from internal source unconditionally before
* marking the McBSP port as free.
* If the external clock source via MCBSP_CLKS pin has been selected the
* system will refuse to enter idle if the CLKS pin source is not reset
* back to internal source.
*/
if (!cpu_class_is_omap1())
omap2_mcbsp_set_clks_src(mcbsp, MCBSP_CLKS_PRCM_SRC);
spin_lock(&mcbsp->lock); spin_lock(&mcbsp->lock);
if (mcbsp->free) if (mcbsp->free)
dev_err(mcbsp->dev, "McBSP%d was not reserved\n", mcbsp->id); dev_err(mcbsp->dev, "McBSP%d was not reserved\n", mcbsp->id);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册