mirror of
https://github.com/torvalds/linux.git
synced 2026-09-22 12:44:03 +02:00
dmaengine: xilinx_dma: Rename XILINX_DMA_LOOP_COUNT
Rename XILINX_DMA_LOOP_COUNT to XILINX_DMA_POLL_TIMEOUT_US because it is a timeout value, not a loop count for polling register in microseconds. No functional changes. Reviewed-by: Suraj Gupta <suraj.gupta2@amd.com> Signed-off-by: Alex Bereza <alex@bereza.email> Link: https://patch.msgid.link/20260402-fix-atomic-poll-timeout-regression-v4-2-f30d6a6c13cb@bereza.email Signed-off-by: Vinod Koul <vkoul@kernel.org>
This commit is contained in:
parent
aa99c4d1d6
commit
a6404c7291
|
|
@ -165,8 +165,8 @@
|
|||
#define XILINX_DMA_FLUSH_MM2S 2
|
||||
#define XILINX_DMA_FLUSH_BOTH 1
|
||||
|
||||
/* Delay loop counter to prevent hardware failure */
|
||||
#define XILINX_DMA_LOOP_COUNT 1000000
|
||||
/* Timeout for polling various registers */
|
||||
#define XILINX_DMA_POLL_TIMEOUT_US 1000000
|
||||
/* Delay between polls (avoid a delay of 0 to prevent CPU stalls) */
|
||||
#define XILINX_DMA_POLL_DELAY_US 10
|
||||
|
||||
|
|
@ -1328,7 +1328,7 @@ static int xilinx_dma_stop_transfer(struct xilinx_dma_chan *chan)
|
|||
return xilinx_dma_poll_timeout(chan, XILINX_DMA_REG_DMASR, val,
|
||||
val & XILINX_DMA_DMASR_HALTED,
|
||||
XILINX_DMA_POLL_DELAY_US,
|
||||
XILINX_DMA_LOOP_COUNT);
|
||||
XILINX_DMA_POLL_TIMEOUT_US);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -1344,7 +1344,7 @@ static int xilinx_cdma_stop_transfer(struct xilinx_dma_chan *chan)
|
|||
return xilinx_dma_poll_timeout(chan, XILINX_DMA_REG_DMASR, val,
|
||||
val & XILINX_DMA_DMASR_IDLE,
|
||||
XILINX_DMA_POLL_DELAY_US,
|
||||
XILINX_DMA_LOOP_COUNT);
|
||||
XILINX_DMA_POLL_TIMEOUT_US);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -1362,7 +1362,7 @@ static void xilinx_dma_start(struct xilinx_dma_chan *chan)
|
|||
err = xilinx_dma_poll_timeout(chan, XILINX_DMA_REG_DMASR, val,
|
||||
!(val & XILINX_DMA_DMASR_HALTED),
|
||||
XILINX_DMA_POLL_DELAY_US,
|
||||
XILINX_DMA_LOOP_COUNT);
|
||||
XILINX_DMA_POLL_TIMEOUT_US);
|
||||
|
||||
if (err) {
|
||||
dev_err(chan->dev, "Cannot start channel %p: %x\n",
|
||||
|
|
@ -1807,7 +1807,7 @@ static int xilinx_dma_reset(struct xilinx_dma_chan *chan)
|
|||
err = xilinx_dma_poll_timeout(chan, XILINX_DMA_REG_DMACR, tmp,
|
||||
!(tmp & XILINX_DMA_DMACR_RESET),
|
||||
XILINX_DMA_POLL_DELAY_US,
|
||||
XILINX_DMA_LOOP_COUNT);
|
||||
XILINX_DMA_POLL_TIMEOUT_US);
|
||||
|
||||
if (err) {
|
||||
dev_err(chan->dev, "reset timeout, cr %x, sr %x\n",
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user