Commit 8a20040f authored by Marek Vasut's avatar Marek Vasut Committed by Vinod Koul
Browse files

dmaengine: xilinx_dma: Configure parking registers only if parking enabled



The VDMA can work in two modes, parking or circular. Do not program the
parking mode registers in case circular mode is used, it is useless.

Signed-off-by: default avatarMarek Vasut <marex@denx.de>
Reviewed-by: default avatarRadhey Shyam Pandey <radhey.shyam.pandey@amd.com>
Link: https://lore.kernel.org/r/20241031171132.56861-1-marex@denx.de


Signed-off-by: default avatarVinod Koul <vkoul@kernel.org>
parent 0f31c091
Loading
Loading
Loading
Loading
+11 −9
Original line number Diff line number Diff line
@@ -1404,6 +1404,7 @@ static void xilinx_vdma_start_transfer(struct xilinx_dma_chan *chan)

	dma_ctrl_write(chan, XILINX_DMA_REG_DMACR, reg);

	if (config->park) {
		j = chan->desc_submitcount;
		reg = dma_read(chan, XILINX_DMA_REG_PARK_PTR);
		if (chan->direction == DMA_MEM_TO_DEV) {
@@ -1414,6 +1415,7 @@ static void xilinx_vdma_start_transfer(struct xilinx_dma_chan *chan)
			reg |= j << XILINX_DMA_PARK_PTR_WR_REF_SHIFT;
		}
		dma_write(chan, XILINX_DMA_REG_PARK_PTR, reg);
	}

	/* Start the hardware */
	xilinx_dma_start(chan);