Re: [PATCH] dmaengine: dw: clear LLP_[SD]_EN bits in last descriptor of a chain

From: Andy Shevchenko
Date: Mon Dec 21 2015 - 14:36:12 EST


On Mon, 2015-12-21 at 19:10 +0000, Mans Rullgard wrote:
> The datasheet requires that the LLP_[SD]_EN bits be cleared whenever
> LLP.LOC is zero, i.e. in the last descriptor of a multi-block chain.
> Make the driver do this.

Acked-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>

>
> Signed-off-by: Mans Rullgard <mans@xxxxxxxxx>
> ---
> Âdrivers/dma/dw/core.c | 2 ++
> Â1 file changed, 2 insertions(+)
>
> diff --git a/drivers/dma/dw/core.c b/drivers/dma/dw/core.c
> index 7067b6ddc1db..ca7cafc82f6b 100644
> --- a/drivers/dma/dw/core.c
> +++ b/drivers/dma/dw/core.c
> @@ -751,6 +751,7 @@ dwc_prep_dma_memcpy(struct dma_chan *chan,
> dma_addr_t dest, dma_addr_t src,
> Â prev->lli.ctllo |= DWC_CTLL_INT_EN;
> Â
> Â prev->lli.llp = 0;
> + prev->lli.ctllo &= ~(DWC_CTLL_LLP_D_EN | DWC_CTLL_LLP_S_EN);
> Â first->txd.flags = flags;
> Â first->total_len = len;
> Â
> @@ -912,6 +913,7 @@ slave_sg_fromdev_fill_desc:
> Â prev->lli.ctllo |= DWC_CTLL_INT_EN;
> Â
> Â prev->lli.llp = 0;
> + prev->lli.ctllo &= ~(DWC_CTLL_LLP_D_EN | DWC_CTLL_LLP_S_EN);
> Â first->total_len = total_len;
> Â
> Â return &first->txd;

--
Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>
Intel Finland Oy

--
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/