Skip to contentSkip to conversation

pxa2xx-i2s: Proper initialization

PATCH RESEND Applied Karl Beldan 2 participants 2 messages May 11, 2009 – May 12, 2009

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

PATCH RESEND 1/4 pxa2xx-i2s: Proper initialization

Reset FIFO logic and registers, and make sure REC and RPL functions along with FIFO service are disabled at probe.

---
 sound/soc/pxa/pxa2xx-i2s.c |   13 +++++++++++++
 1 files changed, 13 insertions(+), 0 deletions(-)
sound/soc/pxa/pxa2xx-i2s.c +13 -0
index 2f4b6e4..450fca6 100644
@@ -346,6 +346,19 @@ static int pxa2xx_i2s_probe(struct platform_device *dev)
 	if (ret != 0)
 		clk_put(clk_i2s);
 
+	/*
+	 * PXA Developer's Manual:
+	 * If SACR0[ENB] is toggled in the middle of a normal operation,
+	 * the SACR0[RST] bit must also be set and cleared to reset all
+	 * I2S controller registers.
+	 */
+	SACR0 = SACR0_RST;
+	SACR0 = 0;
+	/* Make sure RPL and REC are disabled */
+	SACR1 = SACR1_DRPL | SACR1_DREC;
+	/* Along with FIFO servicing */
+	SAIMR &= ~(SAIMR_RFS | SAIMR_TFS);
+
 	return ret;
 }
 
Signature · 4 lines
1.6.3.rc1.34.g0be9b

-- 
Karl Beldan
Applied
#1 lore raw
Quoted 4 lines · Karl Beldan

Reset FIFO logic and registers, and make sure REC and RPL functions along with FIFO service are disabled at probe.

Applied, thanks.