Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751816AbbLUTKp (ORCPT ); Mon, 21 Dec 2015 14:10:45 -0500 Received: from unicorn.mansr.com ([81.2.72.234]:54549 "EHLO unicorn.mansr.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751781AbbLUTKn (ORCPT ); Mon, 21 Dec 2015 14:10:43 -0500 From: Mans Rullgard To: Viresh Kumar , Andy Shevchenko , Dan Williams , Vinod Koul , dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] dmaengine: dw: clear LLP_[SD]_EN bits in last descriptor of a chain Date: Mon, 21 Dec 2015 19:10:37 +0000 Message-Id: <1450725037-26492-1-git-send-email-mans@mansr.com> X-Mailer: git-send-email 2.6.3 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1195 Lines: 37 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 --- 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; -- 2.6.3 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/