From: Ira Snyder <iws@ovro•caltech.edu>
To: Dan Williams <dan.j.williams@intel•com>,
Li Yang <leoli@freescale•com>,
linuxppc-dev@ozlabs•org
Subject: Re: [RFC PATCH] fsldma: Add DMA_SLAVE support
Date: Wed, 3 Jun 2009 11:10:38 -0700 [thread overview]
Message-ID: <20090603181038.GC7292@ovro.caltech.edu> (raw)
In-Reply-To: <20090515225659.GD858@ovro.caltech.edu>
On Fri, May 15, 2009 at 03:56:59PM -0700, Ira Snyder wrote:
> Use the DMA_SLAVE capability of the DMAEngine API to copy/from a
> scatterlist into an arbitrary list of hardware address/length pairs.
>
> This allows a single DMA transaction to copy data from several different
> devices into a scatterlist at the same time.
>
> This also adds support to enable some controller-specific features such as
> external start and external pause of a DMA transaction.
>
> Signed-off-by: Ira W. Snyder <iws@ovro•caltech.edu>
> ---
>
> This is a request for comments on this patch. I hunch it is not quite
> ready for inclusion, though it is certainly ready for review. Correct
> functioning of this patch depends on the patches submitted earlier.
>
> As suggested by Dan Williams, I implemented DMA_SLAVE support for the
> fsldma controller to allow me to use the hardware to transfer to/from a
> scatterlist to a list of hardware address/length pairs.
>
> I implemented support for the extra features available in the DMA
> controller, such as external pause and external start. I have not tested
> the features yet. I am willing to drop the support if everything else
> looks good.
>
> I have implemented helper functions for creating the list of hardware
> address/length pairs as static inline functions in the linux/fsldma.h
> header. Should I incorporate these into the driver itself and use
> EXPORT_SYMBOL()? I've never done this before :)
>
Any comments on this patch?
I've tested the external start feature, and it works great. I had to set
the DMA Request Count (in the mode register) after the driver was in
control. There is no interface for doing this in the existing driver. I
just ioremap()ed the registers and added the value from my driver after
claiming the channel with dma_request_channel().
There are ways to get the DMA controller into a state where the CB bit
stays set no matter what you do. I have only seen this during an
externally controlled transfer, when the external master does weird
things. I would fix this state in terminate_all(), but I have been
unsuccessful in getting the DMA controller working again after it has
been messed up.
Ira
next prev parent reply other threads:[~2009-06-03 18:10 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-15 22:56 [RFC PATCH] fsldma: Add DMA_SLAVE support Ira Snyder
2009-06-03 18:10 ` Ira Snyder [this message]
2009-06-04 11:20 ` Li Yang-R58472
2009-06-04 16:22 ` Ira Snyder
2009-06-16 19:01 ` Dan Williams
2009-06-16 20:12 ` Ira Snyder
2009-06-17 17:17 ` Dan Williams
2009-06-17 18:29 ` Ira Snyder
2009-06-18 18:16 ` Dan Williams
2009-06-18 20:50 ` Ira Snyder
2009-06-18 21:36 ` 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=20090603181038.GC7292@ovro.caltech.edu \
--to=iws@ovro$(echo .)caltech.edu \
--cc=dan.j.williams@intel$(echo .)com \
--cc=leoli@freescale$(echo .)com \
--cc=linuxppc-dev@ozlabs$(echo .)org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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