Skip to content

Commit 46e8c83

Browse files
andy-shevVinod Koul
authored andcommitted
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>
1 parent f0f3b5f commit 46e8c83

2 files changed

Lines changed: 29 additions & 34 deletions

File tree

‎drivers/dma/dw/regs.h‎

Lines changed: 29 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111

1212
#include <linux/interrupt.h>
1313
#include <linux/dmaengine.h>
14-
#include <linux/platform_data/dma-dw.h>
1514

1615
#define DW_DMA_MAX_NR_CHANNELS 8
1716
#define DW_DMA_MAX_NR_REQUESTS 16
@@ -132,6 +131,18 @@ struct dw_dma_regs {
132131
/* Bitfields in DWC_PARAMS */
133132
#define DWC_PARAMS_MBLK_EN 11 /* multi block transfer */
134133

134+
/* bursts size */
135+
enum 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+
135146
/* Bitfields in CTL_LO */
136147
#define DWC_CTLL_INT_EN (1 << 0) /* irqs enabled? */
137148
#define DWC_CTLL_DST_WIDTH(n) ((n)<<1) /* bytes per element */
@@ -161,20 +172,35 @@ struct dw_dma_regs {
161172
#define DWC_CTLH_DONE 0x00001000
162173
#define DWC_CTLH_BLOCK_TS_MASK 0x00000fff
163174

164-
/* Bitfields in CFG_LO. Platform-configurable bits are in <linux/platform_data/dma-dw.h> */
175+
/* Bitfields in CFG_LO */
165176
#define DWC_CFGL_CH_PRIOR_MASK (0x7 << 5) /* priority mask */
166177
#define DWC_CFGL_CH_PRIOR(x) ((x) << 5) /* priority */
167178
#define DWC_CFGL_CH_SUSP (1 << 8) /* pause xfer */
168179
#define DWC_CFGL_FIFO_EMPTY (1 << 9) /* pause xfer */
169180
#define DWC_CFGL_HS_DST (1 << 10) /* handshake w/dst */
170181
#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 */
171192
#define DWC_CFGL_MAX_BURST(x) ((x) << 20)
172193
#define DWC_CFGL_RELOAD_SAR (1 << 30)
173194
#define DWC_CFGL_RELOAD_DAR (1 << 31)
174195

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)
176200
#define DWC_CFGH_DS_UPD_EN (1 << 5)
177201
#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)
178204

179205
/* Bitfields in SGR */
180206
#define DWC_SGR_SGI(x) ((x) << 0)

‎include/linux/platform_data/dma-dw.h‎

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -56,37 +56,6 @@ struct dw_dma_platform_data {
5656
unsigned char data_width[4];
5757
};
5858

59-
/* bursts size */
60-
enum 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-
9059
/* DMA API extensions */
9160
struct dw_cyclic_desc {
9261
struct dw_desc **desc;

0 commit comments

Comments
 (0)