17
17
#include <zephyr/drivers/pinctrl.h>
18
18
#include <zephyr/cache.h>
19
19
20
- #include <zephyr/drivers/dma/dma_stm32.h>
21
- #include <zephyr/drivers/dma.h>
22
20
#include <stm32_ll_dma.h>
23
21
24
22
#include <zephyr/logging/log.h>
@@ -285,15 +283,13 @@ static int i2s_stm32_sai_dma_init(const struct device *dev)
285
283
}
286
284
287
285
#if defined(CONFIG_SOC_SERIES_STM32H7X )
288
- hdma -> Instance = __LL_DMA_GET_STREAM_INSTANCE (stream -> reg , stream -> dma_channel );
289
286
hdma -> Init .PeriphDataAlignment = DMA_PDATAALIGN_HALFWORD ;
290
287
hdma -> Init .MemDataAlignment = DMA_MDATAALIGN_HALFWORD ;
291
288
hdma -> Init .Priority = DMA_PRIORITY_HIGH ;
292
289
hdma -> Init .FIFOMode = DMA_FIFOMODE_DISABLE ;
293
290
hdma -> Init .PeriphInc = DMA_PINC_DISABLE ;
294
291
hdma -> Init .MemInc = DMA_MINC_ENABLE ;
295
292
#else
296
- hdma -> Instance = LL_DMA_GET_CHANNEL_INSTANCE (stream -> reg , stream -> dma_channel );
297
293
hdma -> Init .BlkHWRequest = DMA_BREQ_SINGLE_BURST ;
298
294
hdma -> Init .SrcDataWidth = DMA_SRC_DATAWIDTH_HALFWORD ;
299
295
hdma -> Init .DestDataWidth = DMA_DEST_DATAWIDTH_HALFWORD ;
@@ -303,7 +299,7 @@ static int i2s_stm32_sai_dma_init(const struct device *dev)
303
299
hdma -> Init .TransferAllocatedPort = DMA_SRC_ALLOCATED_PORT0 | DMA_DEST_ALLOCATED_PORT0 ;
304
300
hdma -> Init .TransferEventMode = DMA_TCEM_BLOCK_TRANSFER ;
305
301
#endif
306
-
302
+ hdma -> Instance = STM32_DMA_GET_INSTANCE ( stream -> reg , stream -> dma_channel );
307
303
hdma -> Init .Request = dma_cfg .dma_slot ;
308
304
hdma -> Init .Mode = DMA_NORMAL ;
309
305
0 commit comments