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>
This commit is contained in:
Francois Ramu 2021-06-21 10:55:29 +02:00 committed by Christopher Friedt
commit 6312b7383d
2 changed files with 3 additions and 5 deletions

View file

@ -44,14 +44,14 @@ struct dma_stm32_config {
struct dma_stm32_stream *streams;
};
#if defined(CONFIG_DMAMUX_STM32) || defined(CONFIG_DMA_STM32_V2)
#if !defined(CONFIG_DMA_STM32_V1)
/* from DTS the dma stream id is in range 1..<dma-requests> */
/* so decrease to set range from 0 from now on */
#define STREAM_OFFSET 1
#else
/* from DTS the dma stream id is in range 0..<dma-requests>-1 */
#define STREAM_OFFSET 0
#endif /* CONFIG_DMAMUX_STM32 || CONFIG_DMA_STM32_V2 */
#endif /* ! CONFIG_DMA_STM32_V1 */
uint32_t dma_stm32_id_to_stream(uint32_t id);
#if !defined(CONFIG_DMAMUX_STM32)