Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a3e55799 authored by Mans Rullgard's avatar Mans Rullgard Committed by Vinod Koul
Browse files

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: default avatarMans Rullgard <mans@mansr.com>
Acked-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: default avatarVinod Koul <vinod.koul@intel.com>
parent 2a0fae02
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -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 @@ dwc_prep_slave_sg(struct dma_chan *chan, struct scatterlist *sgl,
		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;