dt-bindings: add support for parsing stm32 dma consumer cells
Add support for parsing stm32 dma consumer cells, format of which follows dma dts format declared in the Linux Kernel for the dma of stm32: https://git.kernel.org/pub/scm/linux/kernel/git/devicetree/devicetree-rebasing.git/plain/Bindings/dma/stm32-dma.txt Signed-off-by: Song Qiang <songqiang1304521@gmail.com>
This commit is contained in:
parent
399c847865
commit
8fa9fecd8c
3 changed files with 48 additions and 0 deletions
13
include/dt-bindings/dma/stm32_dma.h
Normal file
13
include/dt-bindings/dma/stm32_dma.h
Normal file
|
@ -0,0 +1,13 @@
|
|||
/*
|
||||
* Copyright (c) 2019 Song Qiang <songqiang1304521@gmail.com>
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
/* macros for channel-config */
|
||||
#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_INC_FIXED(config) (config & 0x1 << 15)
|
||||
#define STM32_DMA_CONFIG_PRIORITY(config) ((config >> 16) & 0x3)
|
||||
|
||||
/* macros for features */
|
||||
#define STM32_DMA_FEATURES_FIFO_THRESHOLD(features) (features & 0x3)
|
Loading…
Add table
Add a link
Reference in a new issue