Go to the documentation of this file.
21 #ifndef __ASM_ARCH_DMA_H
22 #define __ASM_ARCH_DMA_H
34 #define INT_DMA_LCD 25
37 #define OMAP_DMA_NO_DEVICE 0
38 #define OMAP_DMA_MCSI1_TX 1
39 #define OMAP_DMA_MCSI1_RX 2
40 #define OMAP_DMA_I2C_RX 3
41 #define OMAP_DMA_I2C_TX 4
42 #define OMAP_DMA_EXT_NDMA_REQ 5
43 #define OMAP_DMA_EXT_NDMA_REQ2 6
44 #define OMAP_DMA_UWIRE_TX 7
45 #define OMAP_DMA_MCBSP1_TX 8
46 #define OMAP_DMA_MCBSP1_RX 9
47 #define OMAP_DMA_MCBSP3_TX 10
48 #define OMAP_DMA_MCBSP3_RX 11
49 #define OMAP_DMA_UART1_TX 12
50 #define OMAP_DMA_UART1_RX 13
51 #define OMAP_DMA_UART2_TX 14
52 #define OMAP_DMA_UART2_RX 15
53 #define OMAP_DMA_MCBSP2_TX 16
54 #define OMAP_DMA_MCBSP2_RX 17
55 #define OMAP_DMA_UART3_TX 18
56 #define OMAP_DMA_UART3_RX 19
57 #define OMAP_DMA_CAMERA_IF_RX 20
58 #define OMAP_DMA_MMC_TX 21
59 #define OMAP_DMA_MMC_RX 22
60 #define OMAP_DMA_NAND 23
61 #define OMAP_DMA_IRQ_LCD_LINE 24
62 #define OMAP_DMA_MEMORY_STICK 25
63 #define OMAP_DMA_USB_W2FC_RX0 26
64 #define OMAP_DMA_USB_W2FC_RX1 27
65 #define OMAP_DMA_USB_W2FC_RX2 28
66 #define OMAP_DMA_USB_W2FC_TX0 29
67 #define OMAP_DMA_USB_W2FC_TX1 30
68 #define OMAP_DMA_USB_W2FC_TX2 31
71 #define OMAP_DMA_CRYPTO_DES_IN 32
72 #define OMAP_DMA_SPI_TX 33
73 #define OMAP_DMA_SPI_RX 34
74 #define OMAP_DMA_CRYPTO_HASH 35
75 #define OMAP_DMA_CCP_ATTN 36
76 #define OMAP_DMA_CCP_FIFO_NOT_EMPTY 37
77 #define OMAP_DMA_CMT_APE_TX_CHAN_0 38
78 #define OMAP_DMA_CMT_APE_RV_CHAN_0 39
79 #define OMAP_DMA_CMT_APE_TX_CHAN_1 40
80 #define OMAP_DMA_CMT_APE_RV_CHAN_1 41
81 #define OMAP_DMA_CMT_APE_TX_CHAN_2 42
82 #define OMAP_DMA_CMT_APE_RV_CHAN_2 43
83 #define OMAP_DMA_CMT_APE_TX_CHAN_3 44
84 #define OMAP_DMA_CMT_APE_RV_CHAN_3 45
85 #define OMAP_DMA_CMT_APE_TX_CHAN_4 46
86 #define OMAP_DMA_CMT_APE_RV_CHAN_4 47
87 #define OMAP_DMA_CMT_APE_TX_CHAN_5 48
88 #define OMAP_DMA_CMT_APE_RV_CHAN_5 49
89 #define OMAP_DMA_CMT_APE_TX_CHAN_6 50
90 #define OMAP_DMA_CMT_APE_RV_CHAN_6 51
91 #define OMAP_DMA_CMT_APE_TX_CHAN_7 52
92 #define OMAP_DMA_CMT_APE_RV_CHAN_7 53
93 #define OMAP_DMA_MMC2_TX 54
94 #define OMAP_DMA_MMC2_RX 55
95 #define OMAP_DMA_CRYPTO_DES_OUT 56
98 #define OMAP24XX_DMA_NO_DEVICE 0
99 #define OMAP24XX_DMA_XTI_DMA 1
100 #define OMAP24XX_DMA_EXT_DMAREQ0 2
101 #define OMAP24XX_DMA_EXT_DMAREQ1 3
102 #define OMAP24XX_DMA_GPMC 4
103 #define OMAP24XX_DMA_GFX 5
104 #define OMAP24XX_DMA_DSS 6
105 #define OMAP242X_DMA_VLYNQ_TX 7
106 #define OMAP24XX_DMA_EXT_DMAREQ2 7
107 #define OMAP24XX_DMA_CWT 8
108 #define OMAP24XX_DMA_AES_TX 9
109 #define OMAP24XX_DMA_AES_RX 10
110 #define OMAP24XX_DMA_DES_TX 11
111 #define OMAP24XX_DMA_DES_RX 12
112 #define OMAP24XX_DMA_SHA1MD5_RX 13
113 #define OMAP34XX_DMA_SHA2MD5_RX 13
114 #define OMAP242X_DMA_EXT_DMAREQ2 14
115 #define OMAP242X_DMA_EXT_DMAREQ3 15
116 #define OMAP242X_DMA_EXT_DMAREQ4 16
117 #define OMAP242X_DMA_EAC_AC_RD 17
118 #define OMAP242X_DMA_EAC_AC_WR 18
119 #define OMAP242X_DMA_EAC_MD_UL_RD 19
120 #define OMAP242X_DMA_EAC_MD_UL_WR 20
121 #define OMAP242X_DMA_EAC_MD_DL_RD 21
122 #define OMAP242X_DMA_EAC_MD_DL_WR 22
123 #define OMAP242X_DMA_EAC_BT_UL_RD 23
124 #define OMAP242X_DMA_EAC_BT_UL_WR 24
125 #define OMAP242X_DMA_EAC_BT_DL_RD 25
126 #define OMAP242X_DMA_EAC_BT_DL_WR 26
127 #define OMAP243X_DMA_EXT_DMAREQ3 14
128 #define OMAP24XX_DMA_SPI3_TX0 15
129 #define OMAP24XX_DMA_SPI3_RX0 16
130 #define OMAP24XX_DMA_MCBSP3_TX 17
131 #define OMAP24XX_DMA_MCBSP3_RX 18
132 #define OMAP24XX_DMA_MCBSP4_TX 19
133 #define OMAP24XX_DMA_MCBSP4_RX 20
134 #define OMAP24XX_DMA_MCBSP5_TX 21
135 #define OMAP24XX_DMA_MCBSP5_RX 22
136 #define OMAP24XX_DMA_SPI3_TX1 23
137 #define OMAP24XX_DMA_SPI3_RX1 24
138 #define OMAP243X_DMA_EXT_DMAREQ4 25
139 #define OMAP243X_DMA_EXT_DMAREQ5 26
140 #define OMAP34XX_DMA_I2C3_TX 25
141 #define OMAP34XX_DMA_I2C3_RX 26
142 #define OMAP24XX_DMA_I2C1_TX 27
143 #define OMAP24XX_DMA_I2C1_RX 28
144 #define OMAP24XX_DMA_I2C2_TX 29
145 #define OMAP24XX_DMA_I2C2_RX 30
146 #define OMAP24XX_DMA_MCBSP1_TX 31
147 #define OMAP24XX_DMA_MCBSP1_RX 32
148 #define OMAP24XX_DMA_MCBSP2_TX 33
149 #define OMAP24XX_DMA_MCBSP2_RX 34
150 #define OMAP24XX_DMA_SPI1_TX0 35
151 #define OMAP24XX_DMA_SPI1_RX0 36
152 #define OMAP24XX_DMA_SPI1_TX1 37
153 #define OMAP24XX_DMA_SPI1_RX1 38
154 #define OMAP24XX_DMA_SPI1_TX2 39
155 #define OMAP24XX_DMA_SPI1_RX2 40
156 #define OMAP24XX_DMA_SPI1_TX3 41
157 #define OMAP24XX_DMA_SPI1_RX3 42
158 #define OMAP24XX_DMA_SPI2_TX0 43
159 #define OMAP24XX_DMA_SPI2_RX0 44
160 #define OMAP24XX_DMA_SPI2_TX1 45
161 #define OMAP24XX_DMA_SPI2_RX1 46
162 #define OMAP24XX_DMA_MMC2_TX 47
163 #define OMAP24XX_DMA_MMC2_RX 48
164 #define OMAP24XX_DMA_UART1_TX 49
165 #define OMAP24XX_DMA_UART1_RX 50
166 #define OMAP24XX_DMA_UART2_TX 51
167 #define OMAP24XX_DMA_UART2_RX 52
168 #define OMAP24XX_DMA_UART3_TX 53
169 #define OMAP24XX_DMA_UART3_RX 54
170 #define OMAP24XX_DMA_USB_W2FC_TX0 55
171 #define OMAP24XX_DMA_USB_W2FC_RX0 56
172 #define OMAP24XX_DMA_USB_W2FC_TX1 57
173 #define OMAP24XX_DMA_USB_W2FC_RX1 58
174 #define OMAP24XX_DMA_USB_W2FC_TX2 59
175 #define OMAP24XX_DMA_USB_W2FC_RX2 60
176 #define OMAP24XX_DMA_MMC1_TX 61
177 #define OMAP24XX_DMA_MMC1_RX 62
178 #define OMAP24XX_DMA_MS 63
179 #define OMAP242X_DMA_EXT_DMAREQ5 64
180 #define OMAP243X_DMA_EXT_DMAREQ6 64
181 #define OMAP34XX_DMA_EXT_DMAREQ3 64
182 #define OMAP34XX_DMA_AES2_TX 65
183 #define OMAP34XX_DMA_AES2_RX 66
184 #define OMAP34XX_DMA_DES2_TX 67
185 #define OMAP34XX_DMA_DES2_RX 68
186 #define OMAP34XX_DMA_SHA1MD5_RX 69
187 #define OMAP34XX_DMA_SPI4_TX0 70
188 #define OMAP34XX_DMA_SPI4_RX0 71
189 #define OMAP34XX_DSS_DMA0 72
190 #define OMAP34XX_DSS_DMA1 73
191 #define OMAP34XX_DSS_DMA2 74
192 #define OMAP34XX_DSS_DMA3 75
193 #define OMAP34XX_DMA_MMC3_TX 77
194 #define OMAP34XX_DMA_MMC3_RX 78
195 #define OMAP34XX_DMA_USIM_TX 79
196 #define OMAP34XX_DMA_USIM_RX 80
198 #define OMAP36XX_DMA_UART4_TX 81
199 #define OMAP36XX_DMA_UART4_RX 82
202 #define AM35XX_DMA_UART4_TX 54
203 #define AM35XX_DMA_UART4_RX 55
207 #define OMAP1_DMA_TOUT_IRQ (1 << 0)
208 #define OMAP_DMA_DROP_IRQ (1 << 1)
209 #define OMAP_DMA_HALF_IRQ (1 << 2)
210 #define OMAP_DMA_FRAME_IRQ (1 << 3)
211 #define OMAP_DMA_LAST_IRQ (1 << 4)
212 #define OMAP_DMA_BLOCK_IRQ (1 << 5)
213 #define OMAP1_DMA_SYNC_IRQ (1 << 6)
214 #define OMAP2_DMA_PKT_IRQ (1 << 7)
215 #define OMAP2_DMA_TRANS_ERR_IRQ (1 << 8)
216 #define OMAP2_DMA_SECURE_ERR_IRQ (1 << 9)
217 #define OMAP2_DMA_SUPERVISOR_ERR_IRQ (1 << 10)
218 #define OMAP2_DMA_MISALIGNED_ERR_IRQ (1 << 11)
220 #define OMAP_DMA_CCR_EN (1 << 7)
221 #define OMAP_DMA_CCR_RD_ACTIVE (1 << 9)
222 #define OMAP_DMA_CCR_WR_ACTIVE (1 << 10)
223 #define OMAP_DMA_CCR_SEL_SRC_DST_SYNC (1 << 24)
224 #define OMAP_DMA_CCR_BUFFERING_DISABLE (1 << 25)
226 #define OMAP_DMA_DATA_TYPE_S8 0x00
227 #define OMAP_DMA_DATA_TYPE_S16 0x01
228 #define OMAP_DMA_DATA_TYPE_S32 0x02
230 #define OMAP_DMA_SYNC_ELEMENT 0x00
231 #define OMAP_DMA_SYNC_FRAME 0x01
232 #define OMAP_DMA_SYNC_BLOCK 0x02
233 #define OMAP_DMA_SYNC_PACKET 0x03
235 #define OMAP_DMA_DST_SYNC_PREFETCH 0x02
236 #define OMAP_DMA_SRC_SYNC 0x01
237 #define OMAP_DMA_DST_SYNC 0x00
239 #define OMAP_DMA_PORT_EMIFF 0x00
240 #define OMAP_DMA_PORT_EMIFS 0x01
241 #define OMAP_DMA_PORT_OCP_T1 0x02
242 #define OMAP_DMA_PORT_TIPB 0x03
243 #define OMAP_DMA_PORT_OCP_T2 0x04
244 #define OMAP_DMA_PORT_MPUI 0x05
246 #define OMAP_DMA_AMODE_CONSTANT 0x00
247 #define OMAP_DMA_AMODE_POST_INC 0x01
248 #define OMAP_DMA_AMODE_SINGLE_IDX 0x02
249 #define OMAP_DMA_AMODE_DOUBLE_IDX 0x03
251 #define DMA_DEFAULT_FIFO_DEPTH 0x10
252 #define DMA_DEFAULT_ARB_RATE 0x01
254 #define DMA_THREAD_RESERVE_NORM (0x00 << 12)
255 #define DMA_THREAD_RESERVE_ONET (0x01 << 12)
256 #define DMA_THREAD_RESERVE_TWOT (0x02 << 12)
257 #define DMA_THREAD_RESERVE_THREET (0x03 << 12)
258 #define DMA_THREAD_FIFO_NONE (0x00 << 14)
259 #define DMA_THREAD_FIFO_75 (0x01 << 14)
260 #define DMA_THREAD_FIFO_25 (0x02 << 14)
261 #define DMA_THREAD_FIFO_50 (0x03 << 14)
264 #define DMA_SYSCONFIG_MIDLEMODE_MASK (3 << 12)
265 #define DMA_SYSCONFIG_CLOCKACTIVITY_MASK (3 << 8)
266 #define DMA_SYSCONFIG_EMUFREE (1 << 5)
267 #define DMA_SYSCONFIG_SIDLEMODE_MASK (3 << 3)
268 #define DMA_SYSCONFIG_SOFTRESET (1 << 2)
269 #define DMA_SYSCONFIG_AUTOIDLE (1 << 0)
271 #define DMA_SYSCONFIG_MIDLEMODE(n) ((n) << 12)
272 #define DMA_SYSCONFIG_SIDLEMODE(n) ((n) << 3)
274 #define DMA_IDLEMODE_SMARTIDLE 0x2
275 #define DMA_IDLEMODE_NO_IDLE 0x1
276 #define DMA_IDLEMODE_FORCE_IDLE 0x0
279 #ifndef CONFIG_ARCH_OMAP1
280 #define OMAP_DMA_STATIC_CHAIN 0x1
281 #define OMAP_DMA_DYNAMIC_CHAIN 0x2
282 #define OMAP_DMA_CHAIN_ACTIVE 0x1
283 #define OMAP_DMA_CHAIN_INACTIVE 0x0
286 #define DMA_CH_PRIO_HIGH 0x1
287 #define DMA_CH_PRIO_LOW 0x0
290 #define IS_DMA_ERRATA(id) (errata & (id))
291 #define SET_DMA_ERRATA(id) (errata |= (id))
293 #define DMA_ERRATA_IFRAME_BUFFERING BIT(0x0)
294 #define DMA_ERRATA_PARALLEL_CHANNELS BIT(0x1)
295 #define DMA_ERRATA_i378 BIT(0x2)
296 #define DMA_ERRATA_i541 BIT(0x3)
297 #define DMA_ERRATA_i88 BIT(0x4)
298 #define DMA_ERRATA_3_3 BIT(0x5)
299 #define DMA_ROMCODE_BUG BIT(0x6)
302 #define DMA_LINKED_LCH BIT(0x0)
303 #define GLOBAL_PRIORITY BIT(0x1)
304 #define RESERVE_CHANNEL BIT(0x2)
305 #define IS_CSSA_32 BIT(0x3)
306 #define IS_CDSA_32 BIT(0x4)
307 #define IS_RW_PRIORITY BIT(0x5)
308 #define ENABLE_1510_MODE BIT(0x6)
309 #define SRC_PORT BIT(0x7)
310 #define DST_PORT BIT(0x8)
311 #define SRC_INDEX BIT(0x9)
312 #define DST_INDEX BIT(0xA)
313 #define IS_BURST_ONLY4 BIT(0xB)
314 #define CLEAR_CSR_ON_READ BIT(0xC)
315 #define IS_WORD_16 BIT(0xD)
318 #define DMA_HAS_TRANSPARENT_CAPS (0x1 << 18)
319 #define DMA_HAS_CONSTANT_FILL_CAPS (0x1 << 19)
320 #define DMA_HAS_DESCRIPTOR_CAPS (0x3 << 20)
411 #ifndef CONFIG_ARCH_OMAP1
465 int dma_trigger,
int src_or_dst_synch);
472 unsigned long src_start,
473 int src_ei,
int src_fi);
480 unsigned long dest_start,
481 int dst_ei,
int dst_fi);
504 unsigned char write_prio);
515 #ifndef CONFIG_ARCH_OMAP1
519 int *chain_id,
int no_of_chans,
524 int dest_start,
int elem_count,
537 #if defined(CONFIG_ARCH_OMAP1) && defined(CONFIG_FB_OMAP)