linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Ira Snyder <iws@ovro.caltech.edu>
To: linuxppc-dev@ozlabs.org, Kumar Gala <galak@kernel.crashing.org>,
	Dan Williams <dan.j.williams@intel.com>,
	Li Yang <leoli@freescale.com>
Subject: Re: [PATCH v2] fsldma: Add DMA_SLAVE support
Date: Fri, 19 Jun 2009 11:26:00 -0700	[thread overview]
Message-ID: <20090619182600.GA30992@ovro.caltech.edu> (raw)
In-Reply-To: <20090618225345.GB16741@ovro.caltech.edu>

On Thu, Jun 18, 2009 at 03:53:45PM -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 for a DMA transaction.
> 
> Signed-off-by: Ira W. Snyder <iws@ovro.caltech.edu>
> ---
> 
> After discussion with Dan Williams, this is the second version of the
> DMA_SLAVE API for the Freescale DMA controller. I've tested it heavily
> with both drivers I have written against this API, an FPGA programmer
> and an FPGA data grabber.
> 
> Kumar, Dan asked me to add you to the CC list, so you can have a look at
> this patch before he adds it to his tree.
> 
> The other two small patches I posted earlier are very helpful in testing
> this functionality. They make the fsldma driver leave the BWC (bandwidth
> control) bits alone on the 83xx controller, as well as making the
> external start feature available on 83xx.
> 
> In order for the external start/pause features to be useful, the
> bandwidth control bits (in the mode register) need to be set before
> attempting to use the controller. I could spin a v3 of this patch that
> adds a field to struct fsl_dma_slave to set the bits appropriately. Or I
> could send another patch for that. Thoughts?
> 
> Many thanks to all that have participated in the discussion about this
> patch.
> 
> v1 -> v2:
> * move fsldma.h from include/linux to arch/powerpc/include/asm
> * add kerneldoc documentation
> 

[snip]

> +
> +	/* Enable extra controller features */
> +	if (fsl_chan->set_src_loop_size)
> +		fsl_chan->set_src_loop_size(fsl_chan, slave->src_loop_size);
> +
> +	if (fsl_chan->set_dest_loop_size)
> +		fsl_chan->set_dest_loop_size(fsl_chan, slave->dst_loop_size);
> +
> +	if (fsl_chan->toggle_ext_start)
> +		fsl_chan->toggle_ext_start(fsl_chan, slave->external_start);
> +
> +	if (fsl_chan->toggle_ext_pause)
> +		fsl_chan->toggle_ext_pause(fsl_chan, slave->external_pause);

I just noticed that I got this wrong for external pause. It takes a
size, not a boolean enable/disable. I'll split the size out from the
external pause feature, and send another patch.

> +
> +	return &first->async_tx;
> +

      reply	other threads:[~2009-06-19 18:26 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-18 22:53 [PATCH v2] fsldma: Add DMA_SLAVE support Ira Snyder
2009-06-19 18:26 ` Ira Snyder [this message]

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=20090619182600.GA30992@ovro.caltech.edu \
    --to=iws@ovro.caltech.edu \
    --cc=dan.j.williams@intel.com \
    --cc=galak@kernel.crashing.org \
    --cc=leoli@freescale.com \
    --cc=linuxppc-dev@ozlabs.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).