diff mbox series

[2/4] dt-bindings: dma: fsl-edma: Add fsl-edma.h to prevent hardcoding in dts

Message ID 20231114154824.3617255-3-Frank.Li@nxp.com (mailing list archive)
State Accepted
Commit 1e9b05258271b76ccc04a4b535009d2cb596506a
Headers show
Series dmaengine: fsl-edma: fix eDMAv4 uart dma loop test failure | expand

Commit Message

Frank Li Nov. 14, 2023, 3:48 p.m. UTC
Introduce a common dt-bindings header file, fsl-edma.h, shared between
the driver and dts files. This addition aims to eliminate hardcoded values
in dts files, promoting maintainability and consistency.

DTS header file not support BIT() macro yet. Directly use 2^n number.

Signed-off-by: Frank Li <Frank.Li@nxp.com>
---
 include/dt-bindings/dma/fsl-edma.h | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)
 create mode 100644 include/dt-bindings/dma/fsl-edma.h

Comments

Rob Herring Nov. 16, 2023, 7:30 p.m. UTC | #1
On Tue, 14 Nov 2023 10:48:22 -0500, Frank Li wrote:
> Introduce a common dt-bindings header file, fsl-edma.h, shared between
> the driver and dts files. This addition aims to eliminate hardcoded values
> in dts files, promoting maintainability and consistency.
> 
> DTS header file not support BIT() macro yet. Directly use 2^n number.
> 
> Signed-off-by: Frank Li <Frank.Li@nxp.com>
> ---
>  include/dt-bindings/dma/fsl-edma.h | 21 +++++++++++++++++++++
>  1 file changed, 21 insertions(+)
>  create mode 100644 include/dt-bindings/dma/fsl-edma.h
> 

Reviewed-by: Rob Herring <robh@kernel.org>
diff mbox series

Patch

diff --git a/include/dt-bindings/dma/fsl-edma.h b/include/dt-bindings/dma/fsl-edma.h
new file mode 100644
index 0000000000000..fd11478cfe9cc
--- /dev/null
+++ b/include/dt-bindings/dma/fsl-edma.h
@@ -0,0 +1,21 @@ 
+/* SPDX-License-Identifier: GPL-2.0 OR BSD-2-Clause */
+
+#ifndef _FSL_EDMA_DT_BINDING_H_
+#define _FSL_EDMA_DT_BINDING_H_
+
+/* Receive Channel */
+#define FSL_EDMA_RX		0x1
+
+/* iMX8 audio remote DMA */
+#define FSL_EDMA_REMOTE		0x2
+
+/* FIFO is continue memory region */
+#define FSL_EDMA_MULTI_FIFO	0x4
+
+/* Channel need stick to even channel */
+#define FSL_EDMA_EVEN_CH	0x8
+
+/* Channel need stick to odd channel */
+#define FSL_EDMA_ODD_CH		0x10
+
+#endif