drivers: dma: i2s: stm32: I2S Master DMA support

When configuring the I2S peripheral as a master, the DMA channel
direction must be configured to transfer data from memory to the
peripheral.

Currently the configuration of channel direction is always set for
peripheral to memory regardless of whether it is the TX or the RX
channel.

Signed-off-by: Abe Kohandel <abe@electronshepherds.com>
This commit is contained in:
Abe Kohandel 2020-04-07 23:27:57 -07:00 committed by Carles Cufí
commit 861548f12f
2 changed files with 9 additions and 9 deletions

View file

@ -5,11 +5,11 @@
*/
/* macros for channel-config */
#define STM32_DMA_CONFIG_DIRECTION(config) (config & 0x3 << 6)
#define STM32_DMA_CONFIG_PERIPH_ADDR_INC(config) (config & 0x1 << 9)
#define STM32_DMA_CONFIG_MEM_ADDR_INC(config) (config & 0x1 << 10)
#define STM32_DMA_CONFIG_PERIPH_DATA_SIZE(config) (config & (0x3 << 11))
#define STM32_DMA_CONFIG_MEM_DATA_SIZE(config) (config & (0x3 << 13))
#define STM32_DMA_CONFIG_PERIPH_INC_FIXED(config) (config & 0x1 << 15)
#define STM32_DMA_CONFIG_PERIPHERAL_ADDR_INC(config) (config & 0x1 << 9)
#define STM32_DMA_CONFIG_MEMORY_ADDR_INC(config) (config & 0x1 << 10)
#define STM32_DMA_CONFIG_PERIPHERAL_DATA_SIZE(config) (config & (0x3 << 11))
#define STM32_DMA_CONFIG_MEMORY_DATA_SIZE(config) (config & (0x3 << 13))
#define STM32_DMA_CONFIG_PERIPHERAL_INC_FIXED(config) (config & 0x1 << 15)
#define STM32_DMA_CONFIG_PRIORITY(config) ((config >> 16) & 0x3)
/* macros for features */