All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Heiko Stübner" <heiko@sntech.de>
To: kgene.kim@samsung.com
Cc: ben-linux@fluff.org, linux-arm-kernel@lists.infradead.org,
	linux-samsung-soc@vger.kernel.org
Subject: [PATCH 2/6] ARM: S3C24XX: claim spi channels for hsspi in dma-s3c2443
Date: Mon, 12 Mar 2012 20:01:02 +0100	[thread overview]
Message-ID: <201203122001.03099.heiko@sntech.de> (raw)
In-Reply-To: <201203121959.32966.heiko@sntech.de>

SoCs starting with the S3C2443 contain SPI controllers compatible with the
spi-s3c64xx driver and therefore need separate dma channels for rx and tx.

This patch introduces dma channel declarations for these and changes the
dma-s3c2443.c accordingly.

None of the older SoCs use the spi-dma at all. Most boards bitbang their
spi use and the spi-s3c24xx driver also does not use the dma system.

Signed-off-by: Heiko Stuebner <heiko@sntech.de>
---
 arch/arm/mach-s3c24xx/dma-s3c2443.c      |   16 ++++++++++++----
 arch/arm/mach-s3c24xx/include/mach/dma.h |    4 ++++
 2 files changed, 16 insertions(+), 4 deletions(-)

diff --git a/arch/arm/mach-s3c24xx/dma-s3c2443.c b/arch/arm/mach-s3c24xx/dma-s3c2443.c
index e227c47..2d94228 100644
--- a/arch/arm/mach-s3c24xx/dma-s3c2443.c
+++ b/arch/arm/mach-s3c24xx/dma-s3c2443.c
@@ -55,12 +55,20 @@ static struct s3c24xx_dma_map __initdata s3c2443_dma_mappings[] = {
 		.name		= "sdi",
 		.channels	= MAP(S3C2443_DMAREQSEL_SDI),
 	},
-	[DMACH_SPI0] = {
-		.name		= "spi0",
+	[DMACH_SPI0_RX] = {
+		.name		= "spi0-rx",
+		.channels	= MAP(S3C2443_DMAREQSEL_SPI0RX),
+	},
+	[DMACH_SPI0_TX] = {
+		.name		= "spi0-tx",
 		.channels	= MAP(S3C2443_DMAREQSEL_SPI0TX),
 	},
-	[DMACH_SPI1] = { /* only on S3C2443/S3C2450 */
-		.name		= "spi1",
+	[DMACH_SPI1_RX] = { /* only on S3C2443/S3C2450 */
+		.name		= "spi1-rx",
+		.channels	= MAP(S3C2443_DMAREQSEL_SPI1RX),
+	},
+	[DMACH_SPI1_TX] = { /* only on S3C2443/S3C2450 */
+		.name		= "spi1-tx",
 		.channels	= MAP(S3C2443_DMAREQSEL_SPI1TX),
 	},
 	[DMACH_UART0] = {
diff --git a/arch/arm/mach-s3c24xx/include/mach/dma.h b/arch/arm/mach-s3c24xx/include/mach/dma.h
index acbdfec..454831b 100644
--- a/arch/arm/mach-s3c24xx/include/mach/dma.h
+++ b/arch/arm/mach-s3c24xx/include/mach/dma.h
@@ -47,6 +47,10 @@ enum dma_ch {
 	DMACH_UART2_SRC2,
 	DMACH_UART3,		/* s3c2443 has extra uart */
 	DMACH_UART3_SRC2,
+	DMACH_SPI0_TX,		/* s3c2443/2416/2450 hsspi0 */
+	DMACH_SPI0_RX,		/* s3c2443/2416/2450 hsspi0 */
+	DMACH_SPI1_TX,		/* s3c2443/2450 hsspi1 */
+	DMACH_SPI1_RX,		/* s3c2443/2450 hsspi1 */
 	DMACH_MAX,		/* the end entry */
 };
 
-- 
1.7.2.3

WARNING: multiple messages have this Message-ID (diff)
From: heiko@sntech.de (Heiko Stübner)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/6] ARM: S3C24XX: claim spi channels for hsspi in dma-s3c2443
Date: Mon, 12 Mar 2012 20:01:02 +0100	[thread overview]
Message-ID: <201203122001.03099.heiko@sntech.de> (raw)
In-Reply-To: <201203121959.32966.heiko@sntech.de>

SoCs starting with the S3C2443 contain SPI controllers compatible with the
spi-s3c64xx driver and therefore need separate dma channels for rx and tx.

This patch introduces dma channel declarations for these and changes the
dma-s3c2443.c accordingly.

None of the older SoCs use the spi-dma at all. Most boards bitbang their
spi use and the spi-s3c24xx driver also does not use the dma system.

Signed-off-by: Heiko Stuebner <heiko@sntech.de>
---
 arch/arm/mach-s3c24xx/dma-s3c2443.c      |   16 ++++++++++++----
 arch/arm/mach-s3c24xx/include/mach/dma.h |    4 ++++
 2 files changed, 16 insertions(+), 4 deletions(-)

diff --git a/arch/arm/mach-s3c24xx/dma-s3c2443.c b/arch/arm/mach-s3c24xx/dma-s3c2443.c
index e227c47..2d94228 100644
--- a/arch/arm/mach-s3c24xx/dma-s3c2443.c
+++ b/arch/arm/mach-s3c24xx/dma-s3c2443.c
@@ -55,12 +55,20 @@ static struct s3c24xx_dma_map __initdata s3c2443_dma_mappings[] = {
 		.name		= "sdi",
 		.channels	= MAP(S3C2443_DMAREQSEL_SDI),
 	},
-	[DMACH_SPI0] = {
-		.name		= "spi0",
+	[DMACH_SPI0_RX] = {
+		.name		= "spi0-rx",
+		.channels	= MAP(S3C2443_DMAREQSEL_SPI0RX),
+	},
+	[DMACH_SPI0_TX] = {
+		.name		= "spi0-tx",
 		.channels	= MAP(S3C2443_DMAREQSEL_SPI0TX),
 	},
-	[DMACH_SPI1] = { /* only on S3C2443/S3C2450 */
-		.name		= "spi1",
+	[DMACH_SPI1_RX] = { /* only on S3C2443/S3C2450 */
+		.name		= "spi1-rx",
+		.channels	= MAP(S3C2443_DMAREQSEL_SPI1RX),
+	},
+	[DMACH_SPI1_TX] = { /* only on S3C2443/S3C2450 */
+		.name		= "spi1-tx",
 		.channels	= MAP(S3C2443_DMAREQSEL_SPI1TX),
 	},
 	[DMACH_UART0] = {
diff --git a/arch/arm/mach-s3c24xx/include/mach/dma.h b/arch/arm/mach-s3c24xx/include/mach/dma.h
index acbdfec..454831b 100644
--- a/arch/arm/mach-s3c24xx/include/mach/dma.h
+++ b/arch/arm/mach-s3c24xx/include/mach/dma.h
@@ -47,6 +47,10 @@ enum dma_ch {
 	DMACH_UART2_SRC2,
 	DMACH_UART3,		/* s3c2443 has extra uart */
 	DMACH_UART3_SRC2,
+	DMACH_SPI0_TX,		/* s3c2443/2416/2450 hsspi0 */
+	DMACH_SPI0_RX,		/* s3c2443/2416/2450 hsspi0 */
+	DMACH_SPI1_TX,		/* s3c2443/2450 hsspi1 */
+	DMACH_SPI1_RX,		/* s3c2443/2450 hsspi1 */
 	DMACH_MAX,		/* the end entry */
 };
 
-- 
1.7.2.3

  parent reply	other threads:[~2012-03-12 19:01 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-12 18:59 [PATCH 0/6] S3C24XX: Add support for HSSPI on S3C2416/S3C2443 Heiko Stübner
2012-03-12 18:59 ` Heiko Stübner
2012-03-12 19:00 ` [PATCH 1/6] ARM: S3C24XX: Add forgotten clock lookup table to S3C2443 Heiko Stübner
2012-03-12 19:00   ` Heiko Stübner
2012-04-02 21:08   ` Kukjin Kim
2012-04-02 21:08     ` Kukjin Kim
2012-04-02 22:37     ` Heiko Stübner
2012-04-02 22:37       ` Heiko Stübner
2012-04-25  1:36       ` Kukjin Kim
2012-04-25  1:36         ` Kukjin Kim
2012-03-12 19:01 ` Heiko Stübner [this message]
2012-03-12 19:01   ` [PATCH 2/6] ARM: S3C24XX: claim spi channels for hsspi in dma-s3c2443 Heiko Stübner
2012-03-12 19:01 ` [PATCH 3/6] ARM: S3C24XX: Add map entries needed by the s3c64xx-spi devices Heiko Stübner
2012-03-12 19:01   ` Heiko Stübner
2012-03-12 19:02 ` [PATCH 4/6] ARM: S3C24XX: Add clock-lookup entries required by s3c64xx-spi Heiko Stübner
2012-03-12 19:02   ` Heiko Stübner
2012-03-12 19:03 ` [PATCH v2 5/6] ARM: S3C24XX: Add HSSPI setup callback for s3c64xx-spi driver Heiko Stübner
2012-03-12 19:03   ` Heiko Stübner
2012-03-12 19:03 ` [PATCH 6/6] spi/s3c64xx: Allow usage for ARCH_S3C24XX Heiko Stübner
2012-03-12 19:03   ` Heiko Stübner
2012-04-02 19:25 ` [PATCH 0/6] S3C24XX: Add support for HSSPI on S3C2416/S3C2443 Heiko Stübner
2012-04-02 19:25   ` Heiko Stübner
2012-04-02 21:00   ` Kukjin Kim
2012-04-02 21:00     ` Kukjin Kim
2012-04-25  1:37     ` Kukjin Kim
2012-04-25  1:37       ` Kukjin Kim
  -- strict thread matches above, loose matches on Subject: below --
2012-03-04 18:02 Heiko Stübner
2012-03-04 18:03 ` [PATCH 2/6] ARM: S3C24XX: claim spi channels for hsspi in dma-s3c2443 Heiko Stübner
2012-03-04 18:03   ` Heiko Stübner

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=201203122001.03099.heiko@sntech.de \
    --to=heiko@sntech.de \
    --cc=ben-linux@fluff.org \
    --cc=kgene.kim@samsung.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-samsung-soc@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.