mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Daniel Glöckner" <dg@emlix.com>
To: Chris Zankel <chris@zankel.net>
Cc: linux-kernel@vger.kernel.org, "Daniel Glöckner" <dg@emlix.com>
Subject: [patch 3/4] xtensa: prepare s6105 platform for I2S
Date: Thu, 26 Mar 2009 14:33:47 +0100	[thread overview]
Message-ID: <1238074428-24666-3-git-send-email-dg@emlix.com> (raw)
In-Reply-To: <1238074428-24666-1-git-send-email-dg@emlix.com>

This patch routes the I2S irq, powers up the I2S block and resets the
I2S codec.

Resetting of the codec can't be moved to the sound driver as the reset
line affects another chip as well.

Signed-off-by: Daniel Glöckner <dg@emlix.com>
---
 arch/xtensa/platforms/s6105/device.c |   16 ++++++++++++++++
 arch/xtensa/platforms/s6105/setup.c  |    2 ++
 2 files changed, 18 insertions(+), 0 deletions(-)

diff --git a/arch/xtensa/platforms/s6105/device.c b/arch/xtensa/platforms/s6105/device.c
index d296201..f7af6d2 100644
--- a/arch/xtensa/platforms/s6105/device.c
+++ b/arch/xtensa/platforms/s6105/device.c
@@ -5,6 +5,7 @@
  */
 
 #include <linux/kernel.h>
+#include <linux/delay.h>
 #include <linux/gpio.h>
 #include <linux/i2c.h>
 #include <linux/i2c/s6000.h>
@@ -57,6 +58,13 @@ static const signed char isef_irq_mappings[] = {
 	-1
 };
 
+static const signed char i2s_irq_mappings[] = {
+	S6_INTC_I2S_ERR,
+	S6_INTC_DMA_HOSTTERMCNT(2),
+	S6_INTC_DMA_HOSTTERMCNT(3),
+	-1
+};
+
 static const signed char spi_irq_mappings[] = {
 	S6_INTC_SPI,
 	-1
@@ -68,6 +76,7 @@ const signed char *platform_irq_mappings[NR_IRQS] = {
 	[GMAC_INTNUM] = gmac_irq_mappings,
 	[I2C_INTNUM] = i2c_irq_mappings,
 	[ISEF_INTNUM] = isef_irq_mappings,
+	[I2S_INTNUM] = i2s_irq_mappings,
 	[SPI_INTNUM] = spi_irq_mappings,
 };
 
@@ -388,6 +397,13 @@ static int __init device_init(void)
 {
 	int i;
 
+	/* reset TLV320AIC31 and SAA7121 */
+	if (!gpio_request(GPIO_BP_RESET, "bp_reset")) {
+		gpio_direction_output(GPIO_BP_RESET, 0);
+		udelay(1);
+		gpio_set_value(GPIO_BP_RESET, 1);
+	}
+
 	i2c_register_board_info(S6_I2C_BUS_NUM, s6_i2c_devices,
 				ARRAY_SIZE(s6_i2c_devices));
 	spi_register_board_info(s6_spi_devices, ARRAY_SIZE(s6_spi_devices));
diff --git a/arch/xtensa/platforms/s6105/setup.c b/arch/xtensa/platforms/s6105/setup.c
index 5ffa148..bbd1730 100644
--- a/arch/xtensa/platforms/s6105/setup.c
+++ b/arch/xtensa/platforms/s6105/setup.c
@@ -45,11 +45,13 @@ void __init platform_setup(char **cmdline)
 	reg = readl(S6_REG_GREG1 + S6_GREG1_CLKGATE);
 	reg &= ~(1 << S6_GREG1_BLOCK_SB);
 	reg &= ~(1 << S6_GREG1_BLOCK_GMAC);
+	reg &= ~(1 << S6_GREG1_BLOCK_I2S);
 	writel(reg, S6_REG_GREG1 + S6_GREG1_CLKGATE);
 
 	reg = readl(S6_REG_GREG1 + S6_GREG1_BLOCKENA);
 	reg |= 1 << S6_GREG1_BLOCK_SB;
 	reg |= 1 << S6_GREG1_BLOCK_GMAC;
+	reg |= 1 << S6_GREG1_BLOCK_I2S;
 	writel(reg, S6_REG_GREG1 + S6_GREG1_BLOCKENA);
 
 	printk(KERN_NOTICE "S6105 on Stretch S6000 - "
-- 
1.6.2.107.ge47ee


  parent reply	other threads:[~2009-03-26 13:33 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-26 13:33 [patch 1/4] xtensa: move definition of irq numbers to platform header Daniel Glöckner
2009-03-26 13:33 ` [patch 2/4] xtensa: define irq number for I2S on s6105 Daniel Glöckner
2009-03-26 13:33 ` Daniel Glöckner [this message]
2009-03-26 13:33 ` [patch 4/4] xtensa: enable on-board sound in s6105_defconfig Daniel Glöckner

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=1238074428-24666-3-git-send-email-dg@emlix.com \
    --to=dg@emlix.com \
    --cc=chris@zankel.net \
    --cc=linux-kernel@vger.kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®