All of lore.kernel.org
 help / color / mirror / Atom feed
From: shawn.guo@freescale.com (Shawn Guo)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 5/6] dmaengine: imx-sdma: fix up param for the last BD in sdma_prep_slave_sg()
Date: Fri, 21 Jan 2011 23:15:39 +0800	[thread overview]
Message-ID: <20110121151537.GA1897@S2101-09.ap.freescale.net> (raw)
In-Reply-To: <20110120102808.GX9041@pengutronix.de>

Hi Sascha,

On Thu, Jan 20, 2011 at 11:28:08AM +0100, Sascha Hauer wrote:
> On Thu, Jan 20, 2011 at 05:50:39AM +0800, Shawn Guo wrote:
> > As per the reference manual, bit "L" should be set while bit "C"
> > should be cleared for the last buffer descriptor in the non-cyclic
> > chain, so that sdma can stop trying to find the next BD and end
> > the transfer.
> > 
> > In case of sdma_prep_slave_sg(), BD_LAST needs to be set and BD_CONT
> > be cleared for the last BD.
> 
> Did you test this patch?
> 
Would you suggest any driver on mx51 using this api?  So that I can
test it on my babbage board.  Or you can help test it with mx27/31
mmc driver?  I do not have them on my end.  Thanks.

-- 
Regards,
Shawn
> 
> > 
> > Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
> > ---
> >  drivers/dma/imx-sdma.c |    5 ++++-
> >  1 files changed, 4 insertions(+), 1 deletions(-)
> > 
> > diff --git a/drivers/dma/imx-sdma.c b/drivers/dma/imx-sdma.c
> > index e5af547..fa63ace 100644
> > --- a/drivers/dma/imx-sdma.c
> > +++ b/drivers/dma/imx-sdma.c
> > @@ -931,8 +931,11 @@ static struct dma_async_tx_descriptor *sdma_prep_slave_sg(
> >  
> >  		param = BD_DONE | BD_EXTD | BD_CONT;
> >  
> > -		if (i + 1 == sg_len)
> > +		if (i + 1 == sg_len) {
> >  			param |= BD_INTR;
> > +			param |= BD_LAST;
> > +			param &= ~BD_CONT;
> > +		}
> >  
> >  		dev_dbg(sdma->dev, "entry %d: count: %d dma: 0x%08x %s%s\n",
> >  				i, count, sg->dma_address,
> > -- 
> > 1.7.1
> > 
> > 
> > 
> 
> -- 
> Pengutronix e.K.                           |                             |
> Industrial Linux Solutions                 | http://www.pengutronix.de/  |
> Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
> Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |
> 

  reply	other threads:[~2011-01-21 15:15 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-19 21:50 [PATCH 0/6] A few fixes on imx-sdma Shawn Guo
2011-01-19 21:50 ` [PATCH 1/6] dmaengine: imx-sdma: remove IMX_DMA_SG_LOOP handling in sdma_prep_slave_sg() Shawn Guo
2011-01-19 21:50 ` [PATCH 2/6] dmaengine: imx-sdma: set sdmac->status to DMA_ERROR in err_out of sdma_prep_slave_sg() Shawn Guo
2011-01-19 21:50 ` [PATCH 3/6] dmaengine: imx-sdma: return sdmac->status in sdma_tx_status() Shawn Guo
2011-01-19 21:50 ` [PATCH 4/6] dmaengine: imxs-sdma: correct sdmac->status in sdma_handle_channel_loop() Shawn Guo
2011-01-19 21:50 ` [PATCH 5/6] dmaengine: imx-sdma: fix up param for the last BD in sdma_prep_slave_sg() Shawn Guo
2011-01-20 10:28   ` Sascha Hauer
2011-01-21 15:15     ` Shawn Guo [this message]
2011-01-21 10:24       ` Sascha Hauer
2011-01-21 14:45         ` Shawn Guo
2011-01-19 21:50 ` [PATCH 6/6] dmaengine: imx-sdma: avoid stopping channel in the middle of a BD transfer Shawn Guo
2011-01-20 10:43   ` Shawn Guo
2011-01-20 10:27     ` Sascha Hauer
2011-01-21 15:55       ` Shawn Guo
2011-01-21  9:45         ` Sascha Hauer
2011-01-21 14:53           ` Shawn Guo
2011-01-20  8:56 ` [PATCH 0/6] A few fixes on imx-sdma Shawn Guo
2011-01-31 12:03 ` Sascha Hauer
2011-02-14 10:26   ` 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=20110121151537.GA1897@S2101-09.ap.freescale.net \
    --to=shawn.guo@freescale.com \
    --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 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.