drivers: dma: stm32 dma of type V1 with mux

This is the configuration of the stm32h723 where the
dma1 & dma2 of type V1 with a MUX. Even if DMA is of type V1,
the 'feature' does not exist with DMAMUX

Signed-off-by: Francois Ramu <francois.ramu@st.com>
This commit is contained in:
Francois Ramu 2021-08-16 14:16:12 +02:00 committed by Christopher Friedt
commit c4161024c4
2 changed files with 12 additions and 2 deletions

View file

@ -48,6 +48,9 @@ struct dma_stm32_config {
/* from DTS the dma stream id is in range 1..<dma-requests> */ /* from DTS the dma stream id is in range 1..<dma-requests> */
/* so decrease to set range from 0 from now on */ /* so decrease to set range from 0 from now on */
#define STREAM_OFFSET 1 #define STREAM_OFFSET 1
#elif defined(CONFIG_DMA_STM32_V1) && defined(CONFIG_DMAMUX_STM32)
/* typically on the stm32H7 serie, DMA V1 with mux */
#define STREAM_OFFSET 1
#else #else
/* from DTS the dma stream id is in range 0..<dma-requests>-1 */ /* from DTS the dma stream id is in range 0..<dma-requests>-1 */
#define STREAM_OFFSET 0 #define STREAM_OFFSET 0

View file

@ -19,12 +19,19 @@
#define STM32_DMA_SLOT(id, dir, slot) DT_INST_DMAS_CELL_BY_NAME(id, dir, slot) #define STM32_DMA_SLOT(id, dir, slot) DT_INST_DMAS_CELL_BY_NAME(id, dir, slot)
#endif #endif
#define STM32_DMA_CHANNEL_CONFIG(id, dir) \ #if DT_HAS_COMPAT_STATUS_OKAY(st_stm32_dma_v2) || \
DT_INST_DMAS_CELL_BY_NAME(id, dir, channel_config) DT_HAS_COMPAT_STATUS_OKAY(st_stm32_dma_v2bis) || \
DT_HAS_COMPAT_STATUS_OKAY(st_stm32_dmamux)
#define STM32_DMA_FEATURES(id, dir) 0
#else
#define STM32_DMA_FEATURES(id, dir) \ #define STM32_DMA_FEATURES(id, dir) \
DT_INST_DMAS_CELL_BY_NAME(id, dir, features) DT_INST_DMAS_CELL_BY_NAME(id, dir, features)
#endif
#define STM32_DMA_CTLR(id, dir) \ #define STM32_DMA_CTLR(id, dir) \
DT_INST_DMAS_CTLR_BY_NAME(id, dir) DT_INST_DMAS_CTLR_BY_NAME(id, dir)
#define STM32_DMA_CHANNEL_CONFIG(id, dir) \
DT_INST_DMAS_CELL_BY_NAME(id, dir, channel_config)
/* macros for channel-config */ /* macros for channel-config */
/* direction defined on bits 6-7 */ /* direction defined on bits 6-7 */