Skip to content

Commit ad055bd

Browse files
soburicarlescufi
authored andcommitted
drivers: dma: dma_gd32: Use dma_slot for peripheral request
Use dma_slot for peripheral request instead of linked_channel. This is a more suitable usage as described in dma_config. Signed-off-by: TOKITA Hiroshi <[email protected]>
1 parent 6dc1187 commit ad055bd

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

drivers/dma/dma_gd32.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -404,9 +404,9 @@ static int dma_gd32_config(const struct device *dev, uint32_t channel,
404404
}
405405

406406
#ifdef CONFIG_SOC_SERIES_GD32F4XX
407-
if (dma_cfg->linked_channel > 0xF) {
408-
LOG_ERR("linked_channel must be <7 (%" PRIu32 ")",
409-
dma_cfg->linked_channel);
407+
if (dma_cfg->dma_slot > 0xF) {
408+
LOG_ERR("dma_slot must be <7 (%" PRIu32 ")",
409+
dma_cfg->dma_slot);
410410
return -EINVAL;
411411
}
412412
#endif
@@ -465,7 +465,7 @@ static int dma_gd32_config(const struct device *dev, uint32_t channel,
465465
#ifdef CONFIG_SOC_SERIES_GD32F4XX
466466
if (dma_cfg->channel_direction != MEMORY_TO_MEMORY) {
467467
gd32_dma_channel_subperipheral_select(cfg->reg, channel,
468-
dma_cfg->linked_channel);
468+
dma_cfg->dma_slot);
469469
}
470470
#endif
471471

0 commit comments

Comments
 (0)