Skip to contentSkip to conversation

ASoC: omap-mcbsp: Configure wakeup in later phase

PATCH In review Peter Ujfalusi 2 participants 2 messages Mar 5, 2012

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ASoC: omap-mcbsp: Configure wakeup in later phase

Configure the WAKEUPEN register at the same time we configure the rest of the McBSP registers.
In case of OMAP3+, if the sysclock has been reconfigured we are going to disable McBSP for the duration of the clock change, which will reset the McBSP registers. The WAKEUPEN register need to be configured later, so the changes will be effective during runtime.

---
 sound/soc/omap/mcbsp.c |    7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)
sound/soc/omap/mcbsp.c +3 -4
index 5f6c21d..d716793 100644
@@ -173,6 +173,9 @@ void omap_mcbsp_config(struct omap_mcbsp *mcbsp,
 		MCBSP_WRITE(mcbsp, XCCR, config->xccr);
 		MCBSP_WRITE(mcbsp, RCCR, config->rccr);
 	}
+	/* Enable wakeup behavior */
+	if (mcbsp->pdata->has_wakeup)
+		MCBSP_WRITE(mcbsp, WAKEUPEN, XRDYEN | RRDYEN);
 }
 
 /**
@@ -479,10 +482,6 @@ int omap_mcbsp_request(struct omap_mcbsp *mcbsp)
 	if (mcbsp->pdata && mcbsp->pdata->ops && mcbsp->pdata->ops->request)
 		mcbsp->pdata->ops->request(mcbsp->id - 1);
 
-	/* Enable wakeup behavior */
-	if (mcbsp->pdata->has_wakeup)
-		MCBSP_WRITE(mcbsp, WAKEUPEN, XRDYEN | RRDYEN);
-
 	/*
 	 * Make sure that transmitter, receiver and sample-rate generator are
 	 * not running before activating IRQs.
Signature · 1 line
1.7.8.5
Acked-by on v1 1/1
#1 lore raw
Quoted 6 lines · Peter Ujfalusi

Configure the WAKEUPEN register at the same time we configure the rest of the McBSP registers.
In case of OMAP3+, if the sysclock has been reconfigured we are going to disable McBSP for the duration of the clock change, which will reset the McBSP registers. The WAKEUPEN register need to be configured later, so the changes will be effective during runtime.