All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Shimoda, Yoshihiro" <yoshihiro.shimoda.uh@renesas.com>
To: linux-sh@vger.kernel.org
Subject: [PATCH 1/2] sh: add platform_device for SUDMAC in setup-sh7757
Date: Thu, 05 Jan 2012 05:41:44 +0000	[thread overview]
Message-ID: <4F053818.1080801@renesas.com> (raw)
In-Reply-To: <4E803B21.1030701@renesas.com>

Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
---
 This patch depends on the following patch:
  - dmaengine: shdma: add support for SUDMAC

 arch/sh/include/cpu-sh4/cpu/sh7757.h   |    1 +
 arch/sh/kernel/cpu/sh4a/setup-sh7757.c |   50 ++++++++++++++++++++++++++++++++
 2 files changed, 51 insertions(+), 0 deletions(-)

diff --git a/arch/sh/include/cpu-sh4/cpu/sh7757.h b/arch/sh/include/cpu-sh4/cpu/sh7757.h
index 41f9f8b..f9be40a 100644
--- a/arch/sh/include/cpu-sh4/cpu/sh7757.h
+++ b/arch/sh/include/cpu-sh4/cpu/sh7757.h
@@ -283,5 +283,6 @@ enum {
 	SHDMA_SLAVE_RIIC8_RX,
 	SHDMA_SLAVE_RIIC9_TX,
 	SHDMA_SLAVE_RIIC9_RX,
+	SHDMA_SLAVE_SUDMAC00,
 };
 #endif /* __ASM_SH7757_H__ */
diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7757.c b/arch/sh/kernel/cpu/sh4a/setup-sh7757.c
index 0555929..a3846f5 100644
--- a/arch/sh/kernel/cpu/sh4a/setup-sh7757.c
+++ b/arch/sh/kernel/cpu/sh4a/setup-sh7757.c
@@ -649,6 +649,55 @@ static struct platform_device dma3_device = {
 	},
 };

+/* SUDMAC */
+static const struct sh_dmae_channel sh7757_sudmac_channel[] = {
+	{
+		.offset = 0,
+		.dmars = 0,
+		.dmars_bit = 0,
+	}
+};
+
+static const struct sh_dmae_slave_config sh7757_sudmac00_slaves[] = {
+	{
+		.slave_id	= SHDMA_SLAVE_SUDMAC00,
+		.addr		= 0xfe451000,
+	},
+};
+
+static struct sh_dmae_pdata sudmac00_platform_data = {
+	.slave		= sh7757_sudmac00_slaves,
+	.slave_num	= ARRAY_SIZE(sh7757_sudmac00_slaves),
+	.channel	= sh7757_sudmac_channel,
+	.channel_num	= 1,
+	.no_dmars	= 1,
+	.no_error_irq	= 1,
+	.sudmac		= 1,
+};
+
+static struct resource sh7757_sudmac00_resources[] = {
+	[0] = {
+		.start	= 0xfe451000,
+		.end	= 0xfe451000,
+		.flags	= IORESOURCE_MEM,
+	},
+	{
+		.start	= 50,
+		.end	= 50,
+		.flags	= IORESOURCE_IRQ | IORESOURCE_IRQ_SHAREABLE,
+	},
+};
+
+static struct platform_device sudmac00_device = {
+	.name		= "sh-dma-engine",
+	.id		= 4,
+	.resource	= sh7757_sudmac00_resources,
+	.num_resources	= ARRAY_SIZE(sh7757_sudmac00_resources),
+	.dev		= {
+		.platform_data	= &sudmac00_platform_data,
+	},
+};
+
 static struct platform_device spi0_device = {
 	.name	= "sh_spi",
 	.id	= 0,
@@ -718,6 +767,7 @@ static struct platform_device *sh7757_devices[] __initdata = {
 	&dma1_device,
 	&dma2_device,
 	&dma3_device,
+	&sudmac00_device,
 	&spi0_device,
 	&usb_ehci_device,
 	&usb_ohci_device,
-- 
1.7.1

  reply	other threads:[~2012-01-05  5:41 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-26  8:43 [PATCH 1/2] sh: add platform_device for i2c-riic driver in Yoshihiro Shimoda
2012-01-05  5:41 ` Shimoda, Yoshihiro [this message]
2012-01-08 23:21 ` [PATCH 1/2] sh: add platform_device for SUDMAC in setup-sh7757 Paul Mundt

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=4F053818.1080801@renesas.com \
    --to=yoshihiro.shimoda.uh@renesas.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.