drivers: dma: Enable dma and dmamux on stm32

This patch prepares the dma and introduces the dmamux on soc series
which supports this feature for memory/periph transfers.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
This commit is contained in:
Francois Ramu 2020-04-23 11:38:06 +02:00 committed by Kumar Gala
commit 41df1c9380
6 changed files with 462 additions and 5 deletions

View file

@ -12,6 +12,9 @@
struct dma_stm32_stream {
u32_t direction;
#ifdef CONFIG_DMAMUX_STM32
int mux_channel; /* stores the dmamux channel */
#endif /* CONFIG_DMAMUX_STM32 */
bool source_periph;
bool busy;
u32_t src_size;
@ -71,4 +74,14 @@ u32_t stm32_dma_get_mburst(struct dma_config *config, bool source_periph);
u32_t stm32_dma_get_pburst(struct dma_config *config, bool source_periph);
#endif
#ifdef CONFIG_DMAMUX_STM32
/* dma_stm32_ api functions are exported to the dmamux_stm32 */
int dma_stm32_configure(struct device *dev, u32_t id,
struct dma_config *config);
int dma_stm32_reload(struct device *dev, u32_t id,
u32_t src, u32_t dst, size_t size);
int dma_stm32_start(struct device *dev, u32_t id);
int dma_stm32_stop(struct device *dev, u32_t id);
#endif /* CONFIG_DMAMUX_STM32 */
#endif /* DMA_STM32_H_*/