Re: [PATCH v2] dma: imx-sdma: add support for sdma memory copy

From: Robin Gong
Date: Thu Apr 24 2014 - 05:39:55 EST


On Thu, Apr 24, 2014 at 11:50:06AM +0300, Andy Shevchenko wrote:
> On Thu, 2014-04-24 at 13:09 +0800, Robin Gong wrote:
> > add "device_prep_dma_memcpy" and "device_prep_dma_sg" for memory copy by sdma.
> >
> > Signed-off-by: Robin Gong <b38343@xxxxxxxxxxxxx>
> >
> > ---
> > change:
> > --v2:
> > 1. correct some printk format, such as %pad for dma_addr_t
> > 2. split duplicated code in prep_dma_memcpy and prep_dma_sg to make code clean.
>
> Thanks for an update. One small comment below.
>
> > +
> > +static int check_bd_buswidth(struct sdma_buffer_descriptor *bd,
> > + struct sdma_channel *sdmac, int count,
> > + dma_addr_t dma_dst, dma_addr_t dma_src)
> > +{
> > + int ret = 0;
> > +
> > + if (sdmac->word_size > DMA_SLAVE_BUSWIDTH_4_BYTES)
> > + ret = -EINVAL;
>
> I think two lines above are redundant since you have default path in the
> switch.
>
Thanks, will remove it in next version.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/