All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/4] pxa2xx-i2s: Proper initialization
@ 2009-05-07 23:53 Karl Beldan
  2009-05-08 10:29 ` Mark Brown
  0 siblings, 1 reply; 3+ messages in thread
From: Karl Beldan @ 2009-05-07 23:53 UTC (permalink / raw)
  To: Eric Miao, Russell King
  Cc: alsa-devel, Mark Brown, linux-arm-kernel, Matthieu Dumont


Reset FIFO logic and registers, and make sure REC and RPL functions and
FIFO service are disabled.

Signed-off-by: Karl Beldan <karl.beldan@mobile-devices.fr>
---
 sound/soc/pxa/pxa2xx-i2s.c |   12 ++++++++++++
 1 files changed, 12 insertions(+), 0 deletions(-)

diff --git a/sound/soc/pxa/pxa2xx-i2s.c b/sound/soc/pxa/pxa2xx-i2s.c
index 2f4b6e4..52862dc 100644
--- a/sound/soc/pxa/pxa2xx-i2s.c
+++ b/sound/soc/pxa/pxa2xx-i2s.c
@@ -370,6 +370,18 @@ static struct platform_driver pxa2xx_i2s_driver = {
 static int __init pxa2xx_i2s_init(void)
 {
 	clk_i2s = ERR_PTR(-ENOENT);
+
+	/*
+	 * 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;
+	SACR1 = SACR1_DRPL | SACR1_DREC;
+	SAIMR &= ~(SAIMR_RFS | SAIMR_TFS);
+
 	return platform_driver_register(&pxa2xx_i2s_driver);
 }
 
-- 
1.6.3.rc1.34.g0be9b

-- 
Karl

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-05-08 19:20 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-05-07 23:53 [PATCH 1/4] pxa2xx-i2s: Proper initialization Karl Beldan
2009-05-08 10:29 ` Mark Brown
2009-05-08 19:20   ` Karl Beldan

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.