From: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
To: linux-kernel@vger.kernel.org
Cc: Dan Williams <dan.j.williams@intel.com>,
linux-sh@vger.kernel.org, Paul Mundt <lethal@linux-sh.org>
Subject: [PATCH 5/5] sh: dmaengine support for sh7724
Date: Fri, 4 Dec 2009 19:45:13 +0100 (CET) [thread overview]
Message-ID: <Pine.LNX.4.64.0912041942330.3981@axis700.grange> (raw)
In-Reply-To: <Pine.LNX.4.64.0912041936541.3981@axis700.grange>
Add a dmaengine platform device to sh7724, fix DMA channel interrupt numbers.
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
---
With this patch dmatest works with channels 0-5, channels 6-11 still don't
work for some reason... So, feel free to discard it for now, if a complete
fix would be preferred.
arch/sh/include/cpu-sh4/cpu/dma-sh4a.h | 8 ++++----
arch/sh/kernel/cpu/sh4a/setup-sh7724.c | 14 ++++++++++++++
2 files changed, 18 insertions(+), 4 deletions(-)
diff --git a/arch/sh/include/cpu-sh4/cpu/dma-sh4a.h b/arch/sh/include/cpu-sh4/cpu/dma-sh4a.h
index f0886bc..c4ed660 100644
--- a/arch/sh/include/cpu-sh4/cpu/dma-sh4a.h
+++ b/arch/sh/include/cpu-sh4/cpu/dma-sh4a.h
@@ -19,10 +19,10 @@
#elif defined(CONFIG_CPU_SUBTYPE_SH7723) || \
defined(CONFIG_CPU_SUBTYPE_SH7724)
#define DMTE0_IRQ 48 /* DMAC0A*/
-#define DMTE4_IRQ 40 /* DMAC0B */
-#define DMTE6_IRQ 42
-#define DMTE8_IRQ 76 /* DMAC1A */
-#define DMTE9_IRQ 77
+#define DMTE4_IRQ 76 /* DMAC0B */
+#define DMTE6_IRQ 40
+#define DMTE8_IRQ 42 /* DMAC1A */
+#define DMTE9_IRQ 43
#define DMTE10_IRQ 72 /* DMAC1B */
#define DMTE11_IRQ 73
#define DMAE0_IRQ 78 /* DMA Error IRQ*/
diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7724.c b/arch/sh/kernel/cpu/sh4a/setup-sh7724.c
index 6dc4469..da55a4e 100644
--- a/arch/sh/kernel/cpu/sh4a/setup-sh7724.c
+++ b/arch/sh/kernel/cpu/sh4a/setup-sh7724.c
@@ -23,9 +23,22 @@
#include <linux/notifier.h>
#include <asm/suspend.h>
#include <asm/clock.h>
+#include <asm/dma-sh.h>
#include <asm/mmzone.h>
#include <cpu/sh7724.h>
+static struct sh_dmae_pdata dma_platform_data = {
+ .mode = SHDMA_DMAOR1,
+};
+
+static struct platform_device dma_device = {
+ .name = "sh-dma-engine",
+ .id = -1,
+ .dev = {
+ .platform_data = &dma_platform_data,
+ },
+};
+
/* Serial */
static struct plat_sci_port sci_platform_data[] = {
{
@@ -533,6 +546,7 @@ static struct platform_device *sh7724_devices[] __initdata = {
&tmu3_device,
&tmu4_device,
&tmu5_device,
+ &dma_device,
&sci_device,
&rtc_device,
&iic0_device,
--
1.6.2.4
next prev parent reply other threads:[~2009-12-04 18:44 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-04 18:44 [PATCH 0/5] sh: fix the shdma driver, improve dmatest, support sh7724 Guennadi Liakhovetski
2009-12-04 18:44 ` [PATCH 1/5] sh: DMA driver has to specify its alignment requirements Guennadi Liakhovetski
2009-12-04 18:44 ` [PATCH 2/5] dmaengine: fix dmatest to verify minimum transfer length and test buffer size Guennadi Liakhovetski
2009-12-04 18:44 ` [PATCH 3/5] sh: fix DMA driver's descriptor chaining and cookie assignment Guennadi Liakhovetski
2009-12-08 0:58 ` Dan Williams
2009-12-12 2:11 ` Nobuhiro Iwamatsu
2009-12-04 18:45 ` [PATCH 4/5] sh: stylistic improvements for the DMA driver Guennadi Liakhovetski
2009-12-08 0:54 ` Dan Williams
2009-12-08 8:20 ` Guennadi Liakhovetski
2009-12-04 18:45 ` Guennadi Liakhovetski [this message]
2009-12-08 1:02 ` [PATCH 5/5] sh: dmaengine support for sh7724 Dan Williams
2009-12-08 7:13 ` Paul Mundt
2009-12-17 3:14 ` Nobuhiro Iwamatsu
2009-12-17 5:15 ` Paul Mundt
2009-12-17 7:42 ` Guennadi Liakhovetski
2009-12-17 7:47 ` Paul Mundt
2009-12-17 8:02 ` Guennadi Liakhovetski
2009-12-17 8:09 ` Paul Mundt
2009-12-08 1:09 ` [PATCH 0/5] sh: fix the shdma driver, improve dmatest, support sh7724 Dan Williams
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.0912041942330.3981@axis700.grange \
--to=g.liakhovetski@gmx.de \
--cc=dan.j.williams@intel.com \
--cc=lethal@linux-sh.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sh@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®