From: Mans Rullgard Date: Fri, 18 Mar 2016 14:24:45 +0000 (+0200) Subject: dmaengine: dw: clear LLP_[SD]_EN bits in last descriptor of a chain X-Git-Tag: v4.7-rc1~74^2~35 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=a3e557999be74810e02be1d0c107096b7aa48ece;p=karo-tx-linux.git dmaengine: dw: clear LLP_[SD]_EN bits in last descriptor of a chain 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. Signed-off-by: Mans Rullgard Acked-by: Andy Shevchenko Signed-off-by: Vinod Koul --- diff --git a/drivers/dma/dw/core.c b/drivers/dma/dw/core.c index 23bb460fff6a..db9b6f433148 100644 --- a/drivers/dma/dw/core.c +++ b/drivers/dma/dw/core.c @@ -759,6 +759,7 @@ dwc_prep_dma_memcpy(struct dma_chan *chan, dma_addr_t dest, dma_addr_t src, lli_set(prev, ctllo, DWC_CTLL_INT_EN); prev->lli.llp = 0; + lli_clear(prev, ctllo, DWC_CTLL_LLP_D_EN | DWC_CTLL_LLP_S_EN); first->txd.flags = flags; first->total_len = len; @@ -919,6 +920,7 @@ slave_sg_fromdev_fill_desc: lli_set(prev, ctllo, DWC_CTLL_INT_EN); prev->lli.llp = 0; + lli_clear(prev, ctllo, DWC_CTLL_LLP_D_EN | DWC_CTLL_LLP_S_EN); first->total_len = total_len; return &first->txd;