drivers: dma: stm32 dma driver using DT compat macro
Controlling the DMA offset for the request, relies on the
dma version different from V1
Signed-off-by: Francois Ramu <francois.ramu@st.com>
diff --git a/drivers/dma/dma_stm32.c b/drivers/dma/dma_stm32.c
index fec4b2e..e8d3539 100644
--- a/drivers/dma/dma_stm32.c
+++ b/drivers/dma/dma_stm32.c
@@ -462,15 +462,13 @@
config->dest_data_size;
}
-#if defined(CONFIG_DMA_STM32_V2) || defined(CONFIG_DMAMUX_STM32)
+#if DT_HAS_COMPAT_STATUS_OKAY(st_stm32_dma_v2) || DT_HAS_COMPAT_STATUS_OKAY(st_stm32_dmamux)
/*
* the with dma V2 and dma mux,
* the request ID is stored in the dma_slot
*/
-#if !defined(CONFIG_SOC_SERIES_STM32F0X) || defined(CONFIG_SOC_STM32F030XC)
DMA_InitStruct.PeriphRequest = config->dma_slot;
#endif
-#endif
LL_DMA_Init(dma, dma_stm32_id_to_stream(id), &DMA_InitStruct);
LL_DMA_EnableIT_TC(dma, dma_stm32_id_to_stream(id));