drivers: dma: sdma: Update buffer descriptor count

Some SDMA scripts (e.g multi-fifo) updates the buffer descriptor
count field after a transfer is complete.

Re-initialize the buffer descriptor to point to the correct
transfer size for the next transfer.

Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
This commit is contained in:
Daniel Baluta 2025-02-13 17:06:41 +02:00 committed by Benjamin Cabé
commit 43a48d4630

View file

@ -202,7 +202,9 @@ void dma_nxp_sdma_callback(sdma_handle_t *handle, void *userData, bool TransferD
break;
}
/* prepare next BD for transfer */
bd = &chan_data->bd_pool[bdIndex];
bd->count = xfer_size;
bd->status |= (uint8_t)kSDMA_BDStatusDone;
SDMA_StartChannelSoftware(dev_cfg->base, chan_data->index);