aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>2014-09-23 10:18:10 -0400
committerVinod Koul <vinod.koul@intel.com>2014-10-15 11:01:04 -0400
commit46e8c83c83c06b90ebc000df481c2fdcee79a141 (patch)
tree36c072d83323fa93411a61e331066060b8662178
parentf0f3b5fa7537e13dfd20b4cd399f00545f9fc0e7 (diff)
dmaengine: dw: move private definitions to regs.h
Since we don't allow user to set registers directly through private slave configuration we may move definitions to the regs.h because they are not used anywhere except core.c part. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com>
-rw-r--r--drivers/dma/dw/regs.h32
-rw-r--r--include/linux/platform_data/dma-dw.h31
2 files changed, 29 insertions, 34 deletions
diff --git a/drivers/dma/dw/regs.h b/drivers/dma/dw/regs.h
index 00d27a9d9c27..e8f92b28ffc2 100644
--- a/drivers/dma/dw/regs.h
+++ b/drivers/dma/dw/regs.h
@@ -11,7 +11,6 @@
11 11
12#include <linux/interrupt.h> 12#include <linux/interrupt.h>
13#include <linux/dmaengine.h> 13#include <linux/dmaengine.h>
14#include <linux/platform_data/dma-dw.h>
15 14
16#define DW_DMA_MAX_NR_CHANNELS 8 15#define DW_DMA_MAX_NR_CHANNELS 8
17#define DW_DMA_MAX_NR_REQUESTS 16 16#define DW_DMA_MAX_NR_REQUESTS 16
@@ -132,6 +131,18 @@ struct dw_dma_regs {
132/* Bitfields in DWC_PARAMS */ 131/* Bitfields in DWC_PARAMS */
133#define DWC_PARAMS_MBLK_EN 11 /* multi block transfer */ 132#define DWC_PARAMS_MBLK_EN 11 /* multi block transfer */
134 133
134/* bursts size */
135enum dw_dma_msize {
136 DW_DMA_MSIZE_1,
137 DW_DMA_MSIZE_4,
138 DW_DMA_MSIZE_8,
139 DW_DMA_MSIZE_16,
140 DW_DMA_MSIZE_32,
141 DW_DMA_MSIZE_64,
142 DW_DMA_MSIZE_128,
143 DW_DMA_MSIZE_256,
144};
145
135/* Bitfields in CTL_LO */ 146/* Bitfields in CTL_LO */
136#define DWC_CTLL_INT_EN (1 << 0) /* irqs enabled? */ 147#define DWC_CTLL_INT_EN (1 << 0) /* irqs enabled? */
137#define DWC_CTLL_DST_WIDTH(n) ((n)<<1) /* bytes per element */ 148#define DWC_CTLL_DST_WIDTH(n) ((n)<<1) /* bytes per element */
@@ -161,20 +172,35 @@ struct dw_dma_regs {
161#define DWC_CTLH_DONE 0x00001000 172#define DWC_CTLH_DONE 0x00001000
162#define DWC_CTLH_BLOCK_TS_MASK 0x00000fff 173#define DWC_CTLH_BLOCK_TS_MASK 0x00000fff
163 174
164/* Bitfields in CFG_LO. Platform-configurable bits are in <linux/platform_data/dma-dw.h> */ 175/* Bitfields in CFG_LO */
165#define DWC_CFGL_CH_PRIOR_MASK (0x7 << 5) /* priority mask */ 176#define DWC_CFGL_CH_PRIOR_MASK (0x7 << 5) /* priority mask */
166#define DWC_CFGL_CH_PRIOR(x) ((x) << 5) /* priority */ 177#define DWC_CFGL_CH_PRIOR(x) ((x) << 5) /* priority */
167#define DWC_CFGL_CH_SUSP (1 << 8) /* pause xfer */ 178#define DWC_CFGL_CH_SUSP (1 << 8) /* pause xfer */
168#define DWC_CFGL_FIFO_EMPTY (1 << 9) /* pause xfer */ 179#define DWC_CFGL_FIFO_EMPTY (1 << 9) /* pause xfer */
169#define DWC_CFGL_HS_DST (1 << 10) /* handshake w/dst */ 180#define DWC_CFGL_HS_DST (1 << 10) /* handshake w/dst */
170#define DWC_CFGL_HS_SRC (1 << 11) /* handshake w/src */ 181#define DWC_CFGL_HS_SRC (1 << 11) /* handshake w/src */
182#define DWC_CFGL_LOCK_CH_XFER (0 << 12) /* scope of LOCK_CH */
183#define DWC_CFGL_LOCK_CH_BLOCK (1 << 12)
184#define DWC_CFGL_LOCK_CH_XACT (2 << 12)
185#define DWC_CFGL_LOCK_BUS_XFER (0 << 14) /* scope of LOCK_BUS */
186#define DWC_CFGL_LOCK_BUS_BLOCK (1 << 14)
187#define DWC_CFGL_LOCK_BUS_XACT (2 << 14)
188#define DWC_CFGL_LOCK_CH (1 << 15) /* channel lockout */
189#define DWC_CFGL_LOCK_BUS (1 << 16) /* busmaster lockout */
190#define DWC_CFGL_HS_DST_POL (1 << 18) /* dst handshake active low */
191#define DWC_CFGL_HS_SRC_POL (1 << 19) /* src handshake active low */
171#define DWC_CFGL_MAX_BURST(x) ((x) << 20) 192#define DWC_CFGL_MAX_BURST(x) ((x) << 20)
172#define DWC_CFGL_RELOAD_SAR (1 << 30) 193#define DWC_CFGL_RELOAD_SAR (1 << 30)
173#define DWC_CFGL_RELOAD_DAR (1 << 31) 194#define DWC_CFGL_RELOAD_DAR (1 << 31)
174 195
175/* Bitfields in CFG_HI. Platform-configurable bits are in <linux/platform_data/dma-dw.h> */ 196/* Bitfields in CFG_HI */
197#define DWC_CFGH_FCMODE (1 << 0)
198#define DWC_CFGH_FIFO_MODE (1 << 1)
199#define DWC_CFGH_PROTCTL(x) ((x) << 2)
176#define DWC_CFGH_DS_UPD_EN (1 << 5) 200#define DWC_CFGH_DS_UPD_EN (1 << 5)
177#define DWC_CFGH_SS_UPD_EN (1 << 6) 201#define DWC_CFGH_SS_UPD_EN (1 << 6)
202#define DWC_CFGH_SRC_PER(x) ((x) << 7)
203#define DWC_CFGH_DST_PER(x) ((x) << 11)
178 204
179/* Bitfields in SGR */ 205/* Bitfields in SGR */
180#define DWC_SGR_SGI(x) ((x) << 0) 206#define DWC_SGR_SGI(x) ((x) << 0)
diff --git a/include/linux/platform_data/dma-dw.h b/include/linux/platform_data/dma-dw.h
index bc411a1bf8e7..d0c97da66e22 100644
--- a/include/linux/platform_data/dma-dw.h
+++ b/include/linux/platform_data/dma-dw.h
@@ -56,37 +56,6 @@ struct dw_dma_platform_data {
56 unsigned char data_width[4]; 56 unsigned char data_width[4];
57}; 57};
58 58
59/* bursts size */
60enum dw_dma_msize {
61 DW_DMA_MSIZE_1,
62 DW_DMA_MSIZE_4,
63 DW_DMA_MSIZE_8,
64 DW_DMA_MSIZE_16,
65 DW_DMA_MSIZE_32,
66 DW_DMA_MSIZE_64,
67 DW_DMA_MSIZE_128,
68 DW_DMA_MSIZE_256,
69};
70
71/* Platform-configurable bits in CFG_HI */
72#define DWC_CFGH_FCMODE (1 << 0)
73#define DWC_CFGH_FIFO_MODE (1 << 1)
74#define DWC_CFGH_PROTCTL(x) ((x) << 2)
75#define DWC_CFGH_SRC_PER(x) ((x) << 7)
76#define DWC_CFGH_DST_PER(x) ((x) << 11)
77
78/* Platform-configurable bits in CFG_LO */
79#define DWC_CFGL_LOCK_CH_XFER (0 << 12) /* scope of LOCK_CH */
80#define DWC_CFGL_LOCK_CH_BLOCK (1 << 12)
81#define DWC_CFGL_LOCK_CH_XACT (2 << 12)
82#define DWC_CFGL_LOCK_BUS_XFER (0 << 14) /* scope of LOCK_BUS */
83#define DWC_CFGL_LOCK_BUS_BLOCK (1 << 14)
84#define DWC_CFGL_LOCK_BUS_XACT (2 << 14)
85#define DWC_CFGL_LOCK_CH (1 << 15) /* channel lockout */
86#define DWC_CFGL_LOCK_BUS (1 << 16) /* busmaster lockout */
87#define DWC_CFGL_HS_DST_POL (1 << 18) /* dst handshake active low */
88#define DWC_CFGL_HS_SRC_POL (1 << 19) /* src handshake active low */
89
90/* DMA API extensions */ 59/* DMA API extensions */
91struct dw_cyclic_desc { 60struct dw_cyclic_desc {
92 struct dw_desc **desc; 61 struct dw_desc **desc;