mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-16 02:46:49 +07:00
dmaengine: sprd: Fix the right place to configure 2-stage transfer
Move the 2-stage configuration before configuring the link-list mode, since we will use some 2-stage configuration to fill the link-list configuration. Signed-off-by: Eric Long <eric.long@unisoc.com> Signed-off-by: Baolin Wang <baolin.wang@linaro.org> Signed-off-by: Vinod Koul <vkoul@kernel.org>
This commit is contained in:
parent
89d03b3c12
commit
c434e377da
@ -911,6 +911,12 @@ sprd_dma_prep_slave_sg(struct dma_chan *chan, struct scatterlist *sgl,
|
||||
schan->linklist.virt_addr = 0;
|
||||
}
|
||||
|
||||
/* Set channel mode and trigger mode for 2-stage transfer */
|
||||
schan->chn_mode =
|
||||
(flags >> SPRD_DMA_CHN_MODE_SHIFT) & SPRD_DMA_CHN_MODE_MASK;
|
||||
schan->trg_mode =
|
||||
(flags >> SPRD_DMA_TRG_MODE_SHIFT) & SPRD_DMA_TRG_MODE_MASK;
|
||||
|
||||
sdesc = kzalloc(sizeof(*sdesc), GFP_NOWAIT);
|
||||
if (!sdesc)
|
||||
return NULL;
|
||||
@ -944,12 +950,6 @@ sprd_dma_prep_slave_sg(struct dma_chan *chan, struct scatterlist *sgl,
|
||||
}
|
||||
}
|
||||
|
||||
/* Set channel mode and trigger mode for 2-stage transfer */
|
||||
schan->chn_mode =
|
||||
(flags >> SPRD_DMA_CHN_MODE_SHIFT) & SPRD_DMA_CHN_MODE_MASK;
|
||||
schan->trg_mode =
|
||||
(flags >> SPRD_DMA_TRG_MODE_SHIFT) & SPRD_DMA_TRG_MODE_MASK;
|
||||
|
||||
ret = sprd_dma_fill_desc(chan, &sdesc->chn_hw, 0, 0, src, dst, len,
|
||||
dir, flags, slave_cfg);
|
||||
if (ret) {
|
||||
|
Loading…
Reference in New Issue
Block a user