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 <daniel.baluta@nxp.com>
This commit is contained in:
parent
49990869a0
commit
312ff1c904
1 changed files with 2 additions and 0 deletions
|
@ -237,6 +237,8 @@ static void dma_nxp_sdma_setup_bd(const struct device *dev, uint32_t channel,
|
|||
|
||||
chan_data = &dev_data->chan[channel];
|
||||
|
||||
chan_data->capacity = 0;
|
||||
|
||||
/* initialize bd pool */
|
||||
chan_data->bd_pool = &dev_data->bd_pool[channel][0];
|
||||
chan_data->bd_count = config->block_count;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue