From: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
To: alsa-devel@alsa-project.org
Cc: Kuninori Morimoto <morimoto.kuninori@renesas.com>,
Magnus Damm <damm@opensource.se>,
Liam Girdwood <lrg@slimlogic.co.uk>,
Mark Brown <broonie@opensource.wolfsonmicro.com>,
linux-sh@vger.kernel.org
Subject: [PATCH 3/4] sh: add DMA slave definitions and SIU platform data to
Date: Tue, 19 Jan 2010 08:09:06 +0000 [thread overview]
Message-ID: <Pine.LNX.4.64.1001190903500.4607@axis700.grange> (raw)
In-Reply-To: <Pine.LNX.4.64.1001190839110.4607@axis700.grange>
This patch is required to use the SIU ASoC driver on sh7722 systems.
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
---
arch/sh/kernel/cpu/sh4a/setup-sh7722.c | 103 ++++++++++++++++++++++++++++++--
1 files changed, 97 insertions(+), 6 deletions(-)
diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7722.c b/arch/sh/kernel/cpu/sh4a/setup-sh7722.c
index adb65a9..5c6a40d 100644
--- a/arch/sh/kernel/cpu/sh4a/setup-sh7722.c
+++ b/arch/sh/kernel/cpu/sh4a/setup-sh7722.c
@@ -18,8 +18,77 @@
#include <asm/clock.h>
#include <asm/mmzone.h>
#include <asm/dma-sh.h>
+#include <asm/siu.h>
#include <cpu/sh7722.h>
+static struct sh_dmae_slave_config sh7722_dmae_slaves[] = {
+ {
+ .slave_id = SHDMA_SLAVE_SCIF0_TX,
+ .addr = 0xffe0000c,
+ .chcr = DM_FIX | SM_INC | 0x800 | TS_INDEX2VAL(XMIT_SZ_8BIT),
+ .mid_rid = 0x21,
+ }, {
+ .slave_id = SHDMA_SLAVE_SCIF0_RX,
+ .addr = 0xffe00014,
+ .chcr = DM_INC | SM_FIX | 0x800 | TS_INDEX2VAL(XMIT_SZ_8BIT),
+ .mid_rid = 0x22,
+ }, {
+ .slave_id = SHDMA_SLAVE_SCIF1_TX,
+ .addr = 0xffe1000c,
+ .chcr = DM_FIX | SM_INC | 0x800 | TS_INDEX2VAL(XMIT_SZ_8BIT),
+ .mid_rid = 0x25,
+ }, {
+ .slave_id = SHDMA_SLAVE_SCIF1_RX,
+ .addr = 0xffe10014,
+ .chcr = DM_INC | SM_FIX | 0x800 | TS_INDEX2VAL(XMIT_SZ_8BIT),
+ .mid_rid = 0x26,
+ }, {
+ .slave_id = SHDMA_SLAVE_SCIF2_TX,
+ .addr = 0xffe2000c,
+ .chcr = DM_FIX | SM_INC | 0x800 | TS_INDEX2VAL(XMIT_SZ_8BIT),
+ .mid_rid = 0x29,
+ }, {
+ .slave_id = SHDMA_SLAVE_SCIF2_RX,
+ .addr = 0xffe20014,
+ .chcr = DM_INC | SM_FIX | 0x800 | TS_INDEX2VAL(XMIT_SZ_8BIT),
+ .mid_rid = 0x2a,
+ }, {
+ .slave_id = SHDMA_SLAVE_SIUA_TX,
+ .addr = 0xa454c098,
+ .chcr = DM_FIX | SM_INC | 0x800 | TS_INDEX2VAL(XMIT_SZ_32BIT),
+ .mid_rid = 0xb1,
+ }, {
+ .slave_id = SHDMA_SLAVE_SIUA_RX,
+ .addr = 0xa454c090,
+ .chcr = DM_INC | SM_FIX | 0x800 | TS_INDEX2VAL(XMIT_SZ_32BIT),
+ .mid_rid = 0xb2,
+ }, {
+ .slave_id = SHDMA_SLAVE_SIUB_TX,
+ .addr = 0xa454c09c,
+ .chcr = DM_FIX | SM_INC | 0x800 | TS_INDEX2VAL(XMIT_SZ_32BIT),
+ .mid_rid = 0xb5,
+ }, {
+ .slave_id = SHDMA_SLAVE_SIUB_RX,
+ .addr = 0xa454c094,
+ .chcr = DM_INC | SM_FIX | 0x800 | TS_INDEX2VAL(XMIT_SZ_32BIT),
+ .mid_rid = 0xb6,
+ },
+};
+
+static struct sh_dmae_pdata dma_platform_data = {
+ .mode = 0,
+ .config = sh7722_dmae_slaves,
+ .config_num = ARRAY_SIZE(sh7722_dmae_slaves),
+};
+
+struct platform_device dma_device = {
+ .name = "sh-dma-engine",
+ .id = -1,
+ .dev = {
+ .platform_data = &dma_platform_data,
+ },
+};
+
/* Serial */
static struct plat_sci_port scif0_platform_data = {
.mapbase = 0xffe00000,
@@ -388,15 +457,36 @@ static struct platform_device tmu2_device = {
},
};
-static struct sh_dmae_pdata dma_platform_data = {
- .mode = 0,
+static struct siu_platform siu_platform_data = {
+ .dma_dev = &dma_device.dev,
+ .dma_slave_tx_a = SHDMA_SLAVE_SIUA_TX,
+ .dma_slave_rx_a = SHDMA_SLAVE_SIUA_RX,
+ .dma_slave_tx_b = SHDMA_SLAVE_SIUB_TX,
+ .dma_slave_rx_b = SHDMA_SLAVE_SIUB_RX,
};
-static struct platform_device dma_device = {
- .name = "sh-dma-engine",
+static struct resource siu_resources[] = {
+ [0] = {
+ .start = 0xa4540000,
+ .end = 0xa454c10f,
+ .flags = IORESOURCE_MEM,
+ },
+ [1] = {
+ .start = 108,
+ .flags = IORESOURCE_IRQ,
+ },
+};
+
+static struct platform_device siu_device = {
+ .name = "sh_siu",
.id = -1,
- .dev = {
- .platform_data = &dma_platform_data,
+ .dev = {
+ .platform_data = &siu_platform_data,
+ },
+ .resource = siu_resources,
+ .num_resources = ARRAY_SIZE(siu_resources),
+ .archdata = {
+ .hwblk_id = HWBLK_SIU,
},
};
@@ -414,6 +504,7 @@ static struct platform_device *sh7722_devices[] __initdata = {
&vpu_device,
&veu_device,
&jpu_device,
+ &siu_device,
&dma_device,
};
--
1.6.2.4
next prev parent reply other threads:[~2010-01-19 8:09 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-19 8:08 [PATCH 0/4] ALSA: SH: add ASoC driver for SIU audio engine, an audio Guennadi Liakhovetski
2010-01-19 8:08 ` [PATCH 1/4] ASoC: add a WM8978 codec driver Guennadi Liakhovetski
2010-01-19 10:46 ` [alsa-devel] " Liam Girdwood
2010-01-20 20:01 ` Guennadi Liakhovetski
2010-01-20 20:21 ` Mark Brown
2010-01-20 20:25 ` Liam Girdwood
[not found] ` <20100119105729.GA32559@opensource.wolfsonmicro.com::587>
2010-01-20 19:50 ` Guennadi Liakhovetski
2010-01-20 20:17 ` [alsa-devel] " Mark Brown
2010-01-22 8:35 ` Guennadi Liakhovetski
2010-01-22 10:35 ` Mark Brown
2010-01-22 16:27 ` [PATCH 1/4 v2] " Guennadi Liakhovetski
2010-01-22 17:39 ` Liam Girdwood
2010-01-23 20:47 ` [alsa-devel] " Mark Brown
2010-01-26 13:04 ` Guennadi Liakhovetski
2010-01-26 13:26 ` Mark Brown
2010-01-26 14:08 ` Guennadi Liakhovetski
2010-01-26 15:22 ` Mark Brown
2010-01-19 8:09 ` [PATCH 2/4] ASoC: add DAI and platform drivers for SH SIU and support Guennadi Liakhovetski
2010-01-19 11:13 ` [alsa-devel] [PATCH 2/4] ASoC: add DAI and platform drivers Liam Girdwood
2010-01-19 12:34 ` [PATCH 2/4] ASoC: add DAI and platform drivers for SH SIU and Mark Brown
2010-01-22 18:09 ` [PATCH 2a/4 v2] ASoC: add DAI and platform / DMA drivers for SH SIU Guennadi Liakhovetski
2010-01-25 13:58 ` [PATCH 2a/4 v2] ASoC: add DAI and platform / DMA drivers for Liam Girdwood
2010-01-25 15:06 ` Mark Brown
2010-01-22 18:17 ` [PATCH 2b/4 v2] ASoC: add support for the sh7722 Migo-R board Guennadi Liakhovetski
2010-01-25 13:21 ` Mark Brown
2010-01-25 13:47 ` [alsa-devel] [PATCH 2b/4 v2] ASoC: add support for the sh7722 Liam Girdwood
2010-01-27 11:15 ` [PATCH 2b/4 v2] ASoC: add support for the sh7722 Migo-R board Guennadi Liakhovetski
2010-01-29 14:13 ` [alsa-devel] [PATCH 2b/4 v2] ASoC: add support for the sh7722 Mark Brown
2010-01-19 8:09 ` Guennadi Liakhovetski [this message]
2010-01-19 8:09 ` [PATCH 4/4] sh: audio support for the sh7722 Migo-R board Guennadi Liakhovetski
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=Pine.LNX.4.64.1001190903500.4607@axis700.grange \
--to=g.liakhovetski@gmx.de \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@opensource.wolfsonmicro.com \
--cc=damm@opensource.se \
--cc=linux-sh@vger.kernel.org \
--cc=lrg@slimlogic.co.uk \
--cc=morimoto.kuninori@renesas.com \
/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