ASoC: qcom: add wrdma register definitions
authorSrinivas Kandagatla <srinivas.kandagatla@linaro.org>
Thu, 11 Feb 2016 12:18:14 +0000 (12:18 +0000)
committerMark Brown <broonie@kernel.org>
Fri, 19 Feb 2016 16:20:18 +0000 (01:20 +0900)
This patch adds wrdma registers into the lpaif-reg.h.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Acked-by: Kenneth Westfield <kwestfie@codeaurora.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/qcom/lpass-lpaif-reg.h

index 65997945cc2562062ce8daf1dda475578f0efd14..760d21905f90e38215e01b37fe3d4a5b39c2189b 100644 (file)
 #define LPAIF_RDMACTL_ENABLE_OFF       (0 << LPAIF_RDMACTL_ENABLE_SHIFT)
 #define LPAIF_RDMACTL_ENABLE_ON                (1 << LPAIF_RDMACTL_ENABLE_SHIFT)
 
+#define LPAIF_WRDMA_REG_ADDR(v, addr, chan) \
+       (v->wrdma_reg_base + (addr) + \
+        v->wrdma_reg_stride * (chan - v->wrdma_channel_start))
+
+#define LPAIF_WRDMACTL_REG(v, chan)    LPAIF_WRDMA_REG_ADDR(v, 0x00, (chan))
+#define LPAIF_WRDMABASE_REG(v, chan)   LPAIF_WRDMA_REG_ADDR(v, 0x04, (chan))
+#define        LPAIF_WRDMABUFF_REG(v, chan)    LPAIF_WRDMA_REG_ADDR(v, 0x08, (chan))
+#define LPAIF_WRDMACURR_REG(v, chan)   LPAIF_WRDMA_REG_ADDR(v, 0x0C, (chan))
+#define        LPAIF_WRDMAPER_REG(v, chan)     LPAIF_WRDMA_REG_ADDR(v, 0x10, (chan))
+#define        LPAIF_WRDMAPERCNT_REG(v, chan)  LPAIF_WRDMA_REG_ADDR(v, 0x14, (chan))
+
 #endif /* __LPASS_LPAIF_REG_H__ */