Skip to content

Commit

Permalink
drivers: dma: siwx917: Add error handling for cyclic DMA
Browse files Browse the repository at this point in the history
Return an error code when cyclic DMA is configured, as this
feature is not supported by the siwx917 hardware

Signed-off-by: Sai Santhosh Malae <[email protected]>
  • Loading branch information
smalae committed Jan 20, 2025
1 parent f496ddb commit 4932011
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions drivers/dma/dma_silabs_siwx917.c
Original file line number Diff line number Diff line change
Expand Up @@ -342,9 +342,13 @@ static int siwx917_dma_configure(const struct device *dev, uint32_t channel,
return -EINVAL;
}

if (config->cyclic) {
/* Cyclic DMA feature is not supported by siwx917 HW */
return -EINVAL;
}

/* Configure dma channel for transfer */
if (config->head_block->source_gather_en || config->head_block->dest_scatter_en ||
config->cyclic) {
if (config->head_block->source_gather_en || config->head_block->dest_scatter_en) {
/* Configure DMA for a Scatter-Gather transfer */
status = siwx917_sg_config(dev, udma_handle, channel, config);
} else {
Expand Down

0 comments on commit 4932011

Please sign in to comment.