2009-03-26 13:33:10

by Daniel Glöckner

[permalink] [raw]
Subject: [patch 1/4] xtensa: move definition of irq numbers to platform header

Alsa SoC drivers traditionally provide the platform specific code as
separate modules. Move the list of irq numbers to a header file to
allow it being used in several files.

Signed-off-by: Daniel Glöckner <[email protected]>
---
arch/xtensa/platforms/s6105/device.c | 8 +-------
arch/xtensa/platforms/s6105/include/platform/irq.h | 11 +++++++++++
2 files changed, 12 insertions(+), 7 deletions(-)
create mode 100644 arch/xtensa/platforms/s6105/include/platform/irq.h

diff --git a/arch/xtensa/platforms/s6105/device.c b/arch/xtensa/platforms/s6105/device.c
index bb59580..d296201 100644
--- a/arch/xtensa/platforms/s6105/device.c
+++ b/arch/xtensa/platforms/s6105/device.c
@@ -26,13 +26,7 @@
#include <variant/dmac.h>

#include <platform/gpio.h>
-
-#define GPIO3_INTNUM 3
-#define UART_INTNUM 4
-#define GMAC_INTNUM 5
-#define I2C_INTNUM 6
-#define ISEF_INTNUM 8
-#define SPI_INTNUM 11
+#include <platform/irq.h>

static const signed char gpio3_irq_mappings[] = {
S6_INTC_GPIO(3),
diff --git a/arch/xtensa/platforms/s6105/include/platform/irq.h b/arch/xtensa/platforms/s6105/include/platform/irq.h
new file mode 100644
index 0000000..3d5d4d2
--- /dev/null
+++ b/arch/xtensa/platforms/s6105/include/platform/irq.h
@@ -0,0 +1,11 @@
+#ifndef __XTENSA_PLATFORM_S6105_IRQ_H
+#define __XTENSA_PLATFORM_S6105_IRQ_H
+
+#define GPIO3_INTNUM 3
+#define UART_INTNUM 4
+#define GMAC_INTNUM 5
+#define I2C_INTNUM 6
+#define ISEF_INTNUM 8
+#define SPI_INTNUM 11
+
+#endif
--
1.6.2.107.ge47ee


2009-03-26 13:32:50

by Daniel Glöckner

[permalink] [raw]
Subject: [patch 2/4] xtensa: define irq number for I2S on s6105

Signed-off-by: Daniel Glöckner <[email protected]>
---
arch/xtensa/platforms/s6105/include/platform/irq.h | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/arch/xtensa/platforms/s6105/include/platform/irq.h b/arch/xtensa/platforms/s6105/include/platform/irq.h
index 3d5d4d2..84c972f 100644
--- a/arch/xtensa/platforms/s6105/include/platform/irq.h
+++ b/arch/xtensa/platforms/s6105/include/platform/irq.h
@@ -6,6 +6,7 @@
#define GMAC_INTNUM 5
#define I2C_INTNUM 6
#define ISEF_INTNUM 8
+#define I2S_INTNUM 10
#define SPI_INTNUM 11

#endif
--
1.6.2.107.ge47ee

2009-03-26 13:33:30

by Daniel Glöckner

[permalink] [raw]
Subject: [patch 4/4] xtensa: enable on-board sound in s6105_defconfig

Signed-off-by: Daniel Glöckner <[email protected]>
---
arch/xtensa/configs/s6105_defconfig | 26 ++++++++++++++++++++++++--
1 files changed, 24 insertions(+), 2 deletions(-)

diff --git a/arch/xtensa/configs/s6105_defconfig b/arch/xtensa/configs/s6105_defconfig
index a386a01..6ced233 100644
--- a/arch/xtensa/configs/s6105_defconfig
+++ b/arch/xtensa/configs/s6105_defconfig
@@ -1,7 +1,7 @@
#
# Automatically generated make config: don't edit
# Linux kernel version: 2.6.29-rc7-s6
-# Wed Mar 11 13:38:31 2009
+# Tue Mar 17 11:55:24 2009
#
# CONFIG_FRAME_POINTER is not set
CONFIG_ZONE_DMA=y
@@ -505,7 +505,29 @@ CONFIG_SSB_POSSIBLE=y
# Display device support
#
# CONFIG_DISPLAY_SUPPORT is not set
-# CONFIG_SOUND is not set
+CONFIG_SOUND=y
+# CONFIG_SOUND_OSS_CORE is not set
+CONFIG_SND=y
+CONFIG_SND_TIMER=y
+CONFIG_SND_PCM=y
+# CONFIG_SND_SEQUENCER is not set
+# CONFIG_SND_MIXER_OSS is not set
+# CONFIG_SND_PCM_OSS is not set
+# CONFIG_SND_DYNAMIC_MINORS is not set
+# CONFIG_SND_SUPPORT_OLD_API is not set
+CONFIG_SND_VERBOSE_PROCFS=y
+# CONFIG_SND_VERBOSE_PRINTK is not set
+# CONFIG_SND_DEBUG is not set
+# CONFIG_SND_DRIVERS is not set
+# CONFIG_SND_SPI is not set
+CONFIG_SND_SOC=y
+CONFIG_SND_S6000_SOC=y
+CONFIG_SND_S6000_SOC_I2S=y
+CONFIG_SND_S6000_SOC_S6IPCAM=y
+CONFIG_SND_SOC_I2C_AND_SPI=y
+# CONFIG_SND_SOC_ALL_CODECS is not set
+CONFIG_SND_SOC_TLV320AIC3X=y
+# CONFIG_SOUND_PRIME is not set
# CONFIG_USB_SUPPORT is not set
CONFIG_MMC=y
# CONFIG_MMC_DEBUG is not set
--
1.6.2.107.ge47ee

2009-03-26 13:33:44

by Daniel Glöckner

[permalink] [raw]
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 <[email protected]>
---
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