dmaengine: idma64: clear LLP_[SD]_EN bits in last descriptor
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Tue, 26 Jan 2016 11:43:13 +0000 (13:43 +0200)
committerVinod Koul <vinod.koul@intel.com>
Mon, 15 Feb 2016 16:36:45 +0000 (22:06 +0530)
The datasheet requires that the user must clear LLP_[SD]_EN bits whenever
LLP.LOC is zero, i.e. in the last descriptor of a multi-block chain.

Make the driver do this.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
drivers/dma/idma64.c

index 3cb7b2c781970fc6e43d11fde0ea8779fbb2a6d1..1953e57505f4b4493d3d55bbfec102fdb4ede615 100644 (file)
@@ -289,6 +289,9 @@ static void idma64_desc_fill(struct idma64_chan *idma64c,
 
        /* Trigger an interrupt after the last block is transfered */
        lli->ctllo |= IDMA64C_CTLL_INT_EN;
+
+       /* Disable LLP transfer in the last block */
+       lli->ctllo &= ~(IDMA64C_CTLL_LLP_S_EN | IDMA64C_CTLL_LLP_D_EN);
 }
 
 static struct dma_async_tx_descriptor *idma64_prep_slave_sg(