Skip to content

Commit 2db4657

Browse files
committed
drivers: dma: sdma: Fix noise issue with pause/resume
Each time we configure an SDMA channel we also compute the total allocated DMA buffer length but we assume is initialized with zero. This is true each time a channel is requested. But if there are multiple calls to configure without releasing the channel the buffer length is not correctly computed. So, we need to initialize it with zero each time we reconfigure the dma channel. Signed-off-by: Daniel Baluta <[email protected]>
1 parent 2ad5a5a commit 2db4657

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

drivers/dma/dma_nxp_sdma.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -247,6 +247,8 @@ static void dma_nxp_sdma_setup_bd(const struct device *dev, uint32_t channel,
247247

248248
chan_data = &dev_data->chan[channel];
249249

250+
chan_data->capacity = 0;
251+
250252
/* initialize bd pool */
251253
chan_data->bd_pool = &dev_data->bd_pool[channel][0];
252254
chan_data->bd_count = config->block_count;

0 commit comments

Comments
 (0)