Browse Source

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>
pull/87139/head
Daniel Baluta 5 months ago committed by Benjamin Cabé
parent
commit
43a48d4630
  1. 2
      drivers/dma/dma_nxp_sdma.c

2
drivers/dma/dma_nxp_sdma.c

@ -202,7 +202,9 @@ void dma_nxp_sdma_callback(sdma_handle_t *handle, void *userData, bool TransferD @@ -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);

Loading…
Cancel
Save