All of lore.kernel.org
 help / color / mirror / Atom feed
From: Karl Beldan <karl.beldan@gmail.com>
To: Eric Miao <eric.miao@marvell.com>, Russell King <linux@arm.linux.org.uk>
Cc: alsa-devel@alsa-project.org,
	Mark Brown <broonie@opensource.wolfsonmicro.com>,
	linux-arm-kernel <linux-arm-kernel@lists.arm.linux.org.uk>,
	Matthieu Dumont <matthieu.dumont@mobile-devices.fr>
Subject: [PATCH 1/4] pxa2xx-i2s: Proper initialization
Date: Fri, 08 May 2009 01:53:39 +0200	[thread overview]
Message-ID: <4A037483.6030602@gmail.com> (raw)


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

             reply	other threads:[~2009-05-07 23:53 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-07 23:53 Karl Beldan [this message]
2009-05-08 10:29 ` [PATCH 1/4] pxa2xx-i2s: Proper initialization Mark Brown
2009-05-08 19:20   ` Karl Beldan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4A037483.6030602@gmail.com \
    --to=karl.beldan@gmail.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@opensource.wolfsonmicro.com \
    --cc=eric.miao@marvell.com \
    --cc=linux-arm-kernel@lists.arm.linux.org.uk \
    --cc=linux@arm.linux.org.uk \
    --cc=matthieu.dumont@mobile-devices.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.