提交 d4e44f14 编写于 作者: P Peter Ujfalusi 提交者: Mark Brown

ASoC: omap-mcbsp: Enable/disable sidetone block auto clock gating for omap3

OMAP3's McBSP2 and McBSP3 module have integrated sidetone block with
dedicated SYSCONFIG register. The sidetone is operating from the maain
McBSP module's ICLK. For normal operation the sidetone clock auto idle
support needs to be disabled when it is activated.
Note: This is not enough to avoid choppy sidetone because this AUTOIDLE
bit is controlling only the clock auto idle from the McBSP to the sidetone
block. If the McBSP_ICLK is idling, the sidetone clock is going to do the
same.
Signed-off-by: NPeter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: NMark Brown <broonie@kernel.org>
上级 e04fadaa
...@@ -260,6 +260,10 @@ static void omap_st_on(struct omap_mcbsp *mcbsp) ...@@ -260,6 +260,10 @@ static void omap_st_on(struct omap_mcbsp *mcbsp)
if (mcbsp->pdata->enable_st_clock) if (mcbsp->pdata->enable_st_clock)
mcbsp->pdata->enable_st_clock(mcbsp->id, 1); mcbsp->pdata->enable_st_clock(mcbsp->id, 1);
/* Disable Sidetone clock auto-gating for normal operation */
w = MCBSP_ST_READ(mcbsp, SYSCONFIG);
MCBSP_ST_WRITE(mcbsp, SYSCONFIG, w & ~(ST_AUTOIDLE));
/* Enable McBSP Sidetone */ /* Enable McBSP Sidetone */
w = MCBSP_READ(mcbsp, SSELCR); w = MCBSP_READ(mcbsp, SSELCR);
MCBSP_WRITE(mcbsp, SSELCR, w | SIDETONEEN); MCBSP_WRITE(mcbsp, SSELCR, w | SIDETONEEN);
...@@ -279,6 +283,10 @@ static void omap_st_off(struct omap_mcbsp *mcbsp) ...@@ -279,6 +283,10 @@ static void omap_st_off(struct omap_mcbsp *mcbsp)
w = MCBSP_READ(mcbsp, SSELCR); w = MCBSP_READ(mcbsp, SSELCR);
MCBSP_WRITE(mcbsp, SSELCR, w & ~(SIDETONEEN)); MCBSP_WRITE(mcbsp, SSELCR, w & ~(SIDETONEEN));
/* Enable Sidetone clock auto-gating to reduce power consumption */
w = MCBSP_ST_READ(mcbsp, SYSCONFIG);
MCBSP_ST_WRITE(mcbsp, SYSCONFIG, w | ST_AUTOIDLE);
if (mcbsp->pdata->enable_st_clock) if (mcbsp->pdata->enable_st_clock)
mcbsp->pdata->enable_st_clock(mcbsp->id, 0); mcbsp->pdata->enable_st_clock(mcbsp->id, 0);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册