From: Magnus Damm <magnus.damm@gmail.com>
To: linux-sh@vger.kernel.org
Subject: [PATCH 02/05] dmaengine: shdma: Common SH_DMA_SLAVE_NUMBER
Date: Fri, 19 Mar 2010 04:46:47 +0000 [thread overview]
Message-ID: <20100319044647.17051.25902.sendpatchset@t400s> (raw)
From: Magnus Damm <damm@opensource.se>
Move SHDMA_SLAVE_NUMBER from asm/dmaengine.h to
shdma.h. Set it to 256 to support a wide range
of processors. The amount of memory consumed by
this change is limited to 256 bits.
While at it, rename to SH_DMA_SLAVE_NUMBER to
match with the rest of the file.
Signed-off-by: Magnus Damm <damm@opensource.se>
---
arch/sh/include/asm/dmaengine.h | 1 -
drivers/dma/shdma.c | 4 ++--
drivers/dma/shdma.h | 1 +
3 files changed, 3 insertions(+), 3 deletions(-)
--- 0003/arch/sh/include/asm/dmaengine.h
+++ work/arch/sh/include/asm/dmaengine.h 2010-03-18 16:42:03.000000000 +0900
@@ -34,7 +34,6 @@ enum {
SHDMA_SLAVE_SIUA_RX,
SHDMA_SLAVE_SIUB_TX,
SHDMA_SLAVE_SIUB_RX,
- SHDMA_SLAVE_NUMBER, /* Must stay last */
};
struct sh_dmae_slave_config {
--- 0003/drivers/dma/shdma.c
+++ work/drivers/dma/shdma.c 2010-03-18 16:42:15.000000000 +0900
@@ -44,7 +44,7 @@ enum sh_dmae_desc_status {
#define LOG2_DEFAULT_XFER_SIZE 2
/* A bitmask with bits enough for enum sh_dmae_slave_chan_id */
-static unsigned long sh_dmae_slave_used[BITS_TO_LONGS(SHDMA_SLAVE_NUMBER)];
+static unsigned long sh_dmae_slave_used[BITS_TO_LONGS(SH_DMA_SLAVE_NUMBER)];
static void sh_dmae_chan_ld_cleanup(struct sh_dmae_chan *sh_chan, bool all);
@@ -274,7 +274,7 @@ static struct sh_dmae_slave_config *sh_d
struct sh_dmae_pdata *pdata = shdev->pdata;
int i;
- if (param->slave_id >= SHDMA_SLAVE_NUMBER)
+ if (param->slave_id >= SH_DMA_SLAVE_NUMBER)
return NULL;
for (i = 0; i < pdata->slave_num; i++)
--- 0001/drivers/dma/shdma.h
+++ work/drivers/dma/shdma.h 2010-03-18 16:42:03.000000000 +0900
@@ -19,6 +19,7 @@
#include <asm/dmaengine.h>
+#define SH_DMA_SLAVE_NUMBER 256
#define SH_DMA_TCR_MAX 0x00FFFFFF /* 16MB */
struct device;
next reply other threads:[~2010-03-19 4:46 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-19 4:46 Magnus Damm [this message]
2010-03-19 7:32 ` [PATCH 02/05] dmaengine: shdma: Common SH_DMA_SLAVE_NUMBER 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=20100319044647.17051.25902.sendpatchset@t400s \
--to=magnus.damm@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox