dmaengine: dw: clear LLP_[SD]_EN bits in last descriptor of a chain
authorMans Rullgard <mans@mansr.com>
Fri, 18 Mar 2016 14:24:45 +0000 (16:24 +0200)
committerVinod Koul <vinod.koul@intel.com>
Wed, 13 Apr 2016 16:06:10 +0000 (21:36 +0530)
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 <mans@mansr.com>
Acked-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
drivers/dma/dw/core.c

index 23bb460fff6a0fcef747f2a5665d68bb971ebe19..db9b6f433148c02e1ece8524c8e6a96f93c72592 100644 (file)
@@ -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;