From: linux@arm.linux.org.uk (Russell King - ARM Linux)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2] dmaengine: add CSR SiRFprimaII DMAC driver
Date: Sat, 17 Sep 2011 16:02:46 +0100 [thread overview]
Message-ID: <20110917150246.GH16381@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <1316166960-20964-1-git-send-email-Baohua.Song@csr.com>
On Fri, Sep 16, 2011 at 02:56:00AM -0700, Barry Song wrote:
> +static int sirfsoc_dma_slave_config(struct sirfsoc_dma_chan *schan,
> + struct dma_slave_config *config)
> +{
> + u32 addr, direction;
> + unsigned long flags;
> +
> + switch (config->direction) {
config->direction is deprecated, please don't use it.
> + case DMA_FROM_DEVICE:
> + direction = 0;
> + addr = config->dst_addr;
> + break;
> +
> + case DMA_TO_DEVICE:
> + direction = 1;
> + addr = config->src_addr;
> + break;
> +
> + default:
> + return -EINVAL;
> + }
> +
> + if ((config->src_addr_width != DMA_SLAVE_BUSWIDTH_4_BYTES) ||
> + (config->dst_addr_width != DMA_SLAVE_BUSWIDTH_4_BYTES))
> + return -EINVAL;
> +
> + spin_lock_irqsave(&schan->lock, flags);
> + schan->addr = addr;
> + schan->direction = direction;
> + schan->mode = (config->src_maxburst == 4 ? 1 : 0);
Please store the source address, destination address, and mode separately
for each direction. You should then select from that at prepare time.
next prev parent reply other threads:[~2011-09-17 15:02 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-16 9:56 [PATCH v2] dmaengine: add CSR SiRFprimaII DMAC driver Barry Song
2011-09-16 18:55 ` Jassi Brar
2011-09-17 14:57 ` Barry Song
2011-09-17 15:51 ` Jassi Brar
2011-09-17 15:02 ` Russell King - ARM Linux [this message]
2011-09-17 15:33 ` Barry Song
2011-09-19 8:59 ` Vinod Koul
2011-09-19 9:23 ` Barry Song
2011-09-19 9:41 ` Vinod Koul
2011-09-19 9:56 ` Barry Song
2011-09-19 11:14 ` Vinod Koul
2011-09-19 11:25 ` Barry Song
2011-09-20 3:42 ` Vinod Koul
2011-09-20 4:40 ` Jassi Brar
2011-09-20 5:25 ` Barry Song
2011-09-21 14:49 ` Arnd Bergmann
2011-09-23 2:01 ` Barry Song
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=20110917150246.GH16381@n2100.arm.linux.org.uk \
--to=linux@arm.linux.org.uk \
--cc=linux-arm-kernel@lists.infradead.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;
as well as URLs for NNTP newsgroup(s).