[Sound-open-firmware] [PATCH] dma: dw-dma: Add register macros macro for haswell and broadwell

Liam Girdwood liam.r.girdwood at linux.intel.com
Mon Jan 22 12:33:25 CET 2018


Haswell and Broadwell have some differences with some DMA registers.
Add macros for these bits.

Signed-off-by: Liam Girdwood <liam.r.girdwood at linux.intel.com>
---
 src/drivers/dw-dma.c | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

diff --git a/src/drivers/dw-dma.c b/src/drivers/dw-dma.c
index 394019e..5374f94 100644
--- a/src/drivers/dw-dma.c
+++ b/src/drivers/dw-dma.c
@@ -146,6 +146,25 @@
 #define DW_CTLL_RELOAD_SRC		(1 << 30)
 #define DW_CTLL_RELOAD_DST		(1 << 31)
 
+/* Haswell / Broadwell specific registers */
+#if defined (CONFIG_HASWELL) || defined (CONFIG_BROADWELL)
+
+/* CTL_HI */
+#define DW_CTLH_DONE			0x00001000
+#define DW_CTLH_BLOCK_TS_MASK		0x00000fff
+
+/* CFG_LO */
+#define DW_CFG_CLASS(x)		(x << 5)
+
+/* CFG_HI */
+#define DW_CFGH_SRC_PER(x)		(x << 7)
+#define DW_CFGH_DST_PER(x)		(x << 11)
+
+/* default initial setup register values */
+#define DW_CFG_LOW_DEF				0x0
+#define DW_CFG_HIGH_DEF			0x4
+#endif
+
 /* tracing */
 #define trace_dma(__e)	trace_event(TRACE_CLASS_DMA, __e)
 #define trace_dma_error(__e)	trace_error(TRACE_CLASS_DMA, __e)
-- 
2.14.1



More information about the Sound-open-firmware mailing list