linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] dmaengine: dw: clear LLP_[SD]_EN bits in last descriptor of a chain
@ 2015-12-21 19:10 Mans Rullgard
  2015-12-21 19:34 ` Andy Shevchenko
  2015-12-22  5:38 ` Viresh Kumar
  0 siblings, 2 replies; 5+ messages in thread
From: Mans Rullgard @ 2015-12-21 19:10 UTC (permalink / raw)
  To: Viresh Kumar, Andy Shevchenko, Dan Williams, Vinod Koul,
	dmaengine, linux-kernel

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


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2016-01-06  9:17 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-12-21 19:10 [PATCH] dmaengine: dw: clear LLP_[SD]_EN bits in last descriptor of a chain Mans Rullgard
2015-12-21 19:34 ` Andy Shevchenko
2015-12-22 16:54   ` Shevchenko, Andriy
2016-01-06  9:20     ` Vinod Koul
2015-12-22  5:38 ` Viresh Kumar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).