lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <1238074428-24666-3-git-send-email-dg@emlix.com>
Date:	Thu, 26 Mar 2009 14:33:47 +0100
From:	Daniel Glöckner <dg@...ix.com>
To:	Chris Zankel <chris@...kel.net>
Cc:	linux-kernel@...r.kernel.org,
	Daniel Glöckner <dg@...ix.com>
Subject: [patch 3/4] xtensa: prepare s6105 platform for I2S

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@...ix.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

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ