Go to the documentation of this file. 1 #ifndef __bif_dma_defs_h
2 #define __bif_dma_defs_h
18 #define REG_RD( scope, inst, reg ) \
19 REG_READ( reg_##scope##_##reg, \
20 (inst) + REG_RD_ADDR_##scope##_##reg )
24 #define REG_WR( scope, inst, reg, val ) \
25 REG_WRITE( reg_##scope##_##reg, \
26 (inst) + REG_WR_ADDR_##scope##_##reg, (val) )
30 #define REG_RD_VECT( scope, inst, reg, index ) \
31 REG_READ( reg_##scope##_##reg, \
32 (inst) + REG_RD_ADDR_##scope##_##reg + \
33 (index) * STRIDE_##scope##_##reg )
37 #define REG_WR_VECT( scope, inst, reg, index, val ) \
38 REG_WRITE( reg_##scope##_##reg, \
39 (inst) + REG_WR_ADDR_##scope##_##reg + \
40 (index) * STRIDE_##scope##_##reg, (val) )
44 #define REG_RD_INT( scope, inst, reg ) \
45 REG_READ( int, (inst) + REG_RD_ADDR_##scope##_##reg )
49 #define REG_WR_INT( scope, inst, reg, val ) \
50 REG_WRITE( int, (inst) + REG_WR_ADDR_##scope##_##reg, (val) )
53 #ifndef REG_RD_INT_VECT
54 #define REG_RD_INT_VECT( scope, inst, reg, index ) \
55 REG_READ( int, (inst) + REG_RD_ADDR_##scope##_##reg + \
56 (index) * STRIDE_##scope##_##reg )
59 #ifndef REG_WR_INT_VECT
60 #define REG_WR_INT_VECT( scope, inst, reg, index, val ) \
61 REG_WRITE( int, (inst) + REG_WR_ADDR_##scope##_##reg + \
62 (index) * STRIDE_##scope##_##reg, (val) )
66 #define REG_TYPE_CONV( type, orgtype, val ) \
67 ( { union { orgtype o; type n; } r; r.o = val; r.n; } )
71 #define reg_page_size 8192
75 #define REG_ADDR( scope, inst, reg ) \
76 ( (inst) + REG_RD_ADDR_##scope##_##reg )
80 #define REG_ADDR_VECT( scope, inst, reg, index ) \
81 ( (inst) + REG_RD_ADDR_##scope##_##reg + \
82 (index) * STRIDE_##scope##_##reg )
90 unsigned int burst_len : 1;
91 unsigned int cont : 1;
92 unsigned int end_pad : 1;
94 unsigned int dreq_pin : 3;
95 unsigned int dreq_mode : 2;
96 unsigned int tc_in_pin : 3;
97 unsigned int tc_in_mode : 2;
98 unsigned int bus_mode : 2;
99 unsigned int rate_en : 1;
100 unsigned int wr_all : 1;
101 unsigned int dummy1 : 12;
103 #define REG_RD_ADDR_bif_dma_rw_ch0_ctrl 0
104 #define REG_WR_ADDR_bif_dma_rw_ch0_ctrl 0
108 unsigned int addr : 32;
110 #define REG_RD_ADDR_bif_dma_rw_ch0_addr 4
111 #define REG_WR_ADDR_bif_dma_rw_ch0_addr 4
115 unsigned int run : 1;
116 unsigned int dummy1 : 31;
118 #define REG_RD_ADDR_bif_dma_rw_ch0_start 8
119 #define REG_WR_ADDR_bif_dma_rw_ch0_start 8
123 unsigned int start_cnt : 16;
124 unsigned int dummy1 : 16;
126 #define REG_RD_ADDR_bif_dma_rw_ch0_cnt 12
127 #define REG_WR_ADDR_bif_dma_rw_ch0_cnt 12
131 unsigned int cnt : 16;
132 unsigned int dummy1 : 15;
133 unsigned int run : 1;
135 #define REG_RD_ADDR_bif_dma_r_ch0_stat 16
140 unsigned int burst_len : 1;
141 unsigned int cont : 1;
142 unsigned int end_discard : 1;
143 unsigned int cnt : 1;
144 unsigned int dreq_pin : 3;
145 unsigned int dreq_mode : 2;
146 unsigned int tc_in_pin : 3;
147 unsigned int tc_in_mode : 2;
148 unsigned int bus_mode : 2;
149 unsigned int rate_en : 1;
150 unsigned int dummy1 : 13;
152 #define REG_RD_ADDR_bif_dma_rw_ch1_ctrl 32
153 #define REG_WR_ADDR_bif_dma_rw_ch1_ctrl 32
157 unsigned int addr : 32;
159 #define REG_RD_ADDR_bif_dma_rw_ch1_addr 36
160 #define REG_WR_ADDR_bif_dma_rw_ch1_addr 36
164 unsigned int run : 1;
165 unsigned int dummy1 : 31;
167 #define REG_RD_ADDR_bif_dma_rw_ch1_start 40
168 #define REG_WR_ADDR_bif_dma_rw_ch1_start 40
172 unsigned int start_cnt : 16;
173 unsigned int dummy1 : 16;
175 #define REG_RD_ADDR_bif_dma_rw_ch1_cnt 44
176 #define REG_WR_ADDR_bif_dma_rw_ch1_cnt 44
180 unsigned int cnt : 16;
181 unsigned int dummy1 : 15;
182 unsigned int run : 1;
184 #define REG_RD_ADDR_bif_dma_r_ch1_stat 48
189 unsigned int burst_len : 1;
190 unsigned int cont : 1;
191 unsigned int end_pad : 1;
192 unsigned int cnt : 1;
193 unsigned int dreq_pin : 3;
194 unsigned int dreq_mode : 2;
195 unsigned int tc_in_pin : 3;
196 unsigned int tc_in_mode : 2;
197 unsigned int bus_mode : 2;
198 unsigned int rate_en : 1;
199 unsigned int wr_all : 1;
200 unsigned int dummy1 : 12;
202 #define REG_RD_ADDR_bif_dma_rw_ch2_ctrl 64
203 #define REG_WR_ADDR_bif_dma_rw_ch2_ctrl 64
207 unsigned int addr : 32;
209 #define REG_RD_ADDR_bif_dma_rw_ch2_addr 68
210 #define REG_WR_ADDR_bif_dma_rw_ch2_addr 68
214 unsigned int run : 1;
215 unsigned int dummy1 : 31;
217 #define REG_RD_ADDR_bif_dma_rw_ch2_start 72
218 #define REG_WR_ADDR_bif_dma_rw_ch2_start 72
222 unsigned int start_cnt : 16;
223 unsigned int dummy1 : 16;
225 #define REG_RD_ADDR_bif_dma_rw_ch2_cnt 76
226 #define REG_WR_ADDR_bif_dma_rw_ch2_cnt 76
230 unsigned int cnt : 16;
231 unsigned int dummy1 : 15;
232 unsigned int run : 1;
234 #define REG_RD_ADDR_bif_dma_r_ch2_stat 80
239 unsigned int burst_len : 1;
240 unsigned int cont : 1;
241 unsigned int end_discard : 1;
242 unsigned int cnt : 1;
243 unsigned int dreq_pin : 3;
244 unsigned int dreq_mode : 2;
245 unsigned int tc_in_pin : 3;
246 unsigned int tc_in_mode : 2;
247 unsigned int bus_mode : 2;
248 unsigned int rate_en : 1;
249 unsigned int dummy1 : 13;
251 #define REG_RD_ADDR_bif_dma_rw_ch3_ctrl 96
252 #define REG_WR_ADDR_bif_dma_rw_ch3_ctrl 96
256 unsigned int addr : 32;
258 #define REG_RD_ADDR_bif_dma_rw_ch3_addr 100
259 #define REG_WR_ADDR_bif_dma_rw_ch3_addr 100
263 unsigned int run : 1;
264 unsigned int dummy1 : 31;
266 #define REG_RD_ADDR_bif_dma_rw_ch3_start 104
267 #define REG_WR_ADDR_bif_dma_rw_ch3_start 104
271 unsigned int start_cnt : 16;
272 unsigned int dummy1 : 16;
274 #define REG_RD_ADDR_bif_dma_rw_ch3_cnt 108
275 #define REG_WR_ADDR_bif_dma_rw_ch3_cnt 108
279 unsigned int cnt : 16;
280 unsigned int dummy1 : 15;
281 unsigned int run : 1;
283 #define REG_RD_ADDR_bif_dma_r_ch3_stat 112
287 unsigned int ext_dma0 : 1;
288 unsigned int ext_dma1 : 1;
289 unsigned int ext_dma2 : 1;
290 unsigned int ext_dma3 : 1;
291 unsigned int dummy1 : 28;
293 #define REG_RD_ADDR_bif_dma_rw_intr_mask 128
294 #define REG_WR_ADDR_bif_dma_rw_intr_mask 128
298 unsigned int ext_dma0 : 1;
299 unsigned int ext_dma1 : 1;
300 unsigned int ext_dma2 : 1;
301 unsigned int ext_dma3 : 1;
302 unsigned int dummy1 : 28;
304 #define REG_RD_ADDR_bif_dma_rw_ack_intr 132
305 #define REG_WR_ADDR_bif_dma_rw_ack_intr 132
309 unsigned int ext_dma0 : 1;
310 unsigned int ext_dma1 : 1;
311 unsigned int ext_dma2 : 1;
312 unsigned int ext_dma3 : 1;
313 unsigned int dummy1 : 28;
315 #define REG_RD_ADDR_bif_dma_r_intr 136
319 unsigned int ext_dma0 : 1;
320 unsigned int ext_dma1 : 1;
321 unsigned int ext_dma2 : 1;
322 unsigned int ext_dma3 : 1;
323 unsigned int dummy1 : 28;
325 #define REG_RD_ADDR_bif_dma_r_masked_intr 140
329 unsigned int master_ch : 2;
330 unsigned int master_mode : 3;
331 unsigned int slave_ch : 2;
332 unsigned int slave_mode : 3;
333 unsigned int dummy1 : 22;
335 #define REG_RD_ADDR_bif_dma_rw_pin0_cfg 160
336 #define REG_WR_ADDR_bif_dma_rw_pin0_cfg 160
340 unsigned int master_ch : 2;
341 unsigned int master_mode : 3;
342 unsigned int slave_ch : 2;
343 unsigned int slave_mode : 3;
344 unsigned int dummy1 : 22;
346 #define REG_RD_ADDR_bif_dma_rw_pin1_cfg 164
347 #define REG_WR_ADDR_bif_dma_rw_pin1_cfg 164
351 unsigned int master_ch : 2;
352 unsigned int master_mode : 3;
353 unsigned int slave_ch : 2;
354 unsigned int slave_mode : 3;
355 unsigned int dummy1 : 22;
357 #define REG_RD_ADDR_bif_dma_rw_pin2_cfg 168
358 #define REG_WR_ADDR_bif_dma_rw_pin2_cfg 168
362 unsigned int master_ch : 2;
363 unsigned int master_mode : 3;
364 unsigned int slave_ch : 2;
365 unsigned int slave_mode : 3;
366 unsigned int dummy1 : 22;
368 #define REG_RD_ADDR_bif_dma_rw_pin3_cfg 172
369 #define REG_WR_ADDR_bif_dma_rw_pin3_cfg 172
373 unsigned int master_ch : 2;
374 unsigned int master_mode : 3;
375 unsigned int slave_ch : 2;
376 unsigned int slave_mode : 3;
377 unsigned int dummy1 : 22;
379 #define REG_RD_ADDR_bif_dma_rw_pin4_cfg 176
380 #define REG_WR_ADDR_bif_dma_rw_pin4_cfg 176
384 unsigned int master_ch : 2;
385 unsigned int master_mode : 3;
386 unsigned int slave_ch : 2;
387 unsigned int slave_mode : 3;
388 unsigned int dummy1 : 22;
390 #define REG_RD_ADDR_bif_dma_rw_pin5_cfg 180
391 #define REG_WR_ADDR_bif_dma_rw_pin5_cfg 180
395 unsigned int master_ch : 2;
396 unsigned int master_mode : 3;
397 unsigned int slave_ch : 2;
398 unsigned int slave_mode : 3;
399 unsigned int dummy1 : 22;
401 #define REG_RD_ADDR_bif_dma_rw_pin6_cfg 184
402 #define REG_WR_ADDR_bif_dma_rw_pin6_cfg 184
406 unsigned int master_ch : 2;
407 unsigned int master_mode : 3;
408 unsigned int slave_ch : 2;
409 unsigned int slave_mode : 3;
410 unsigned int dummy1 : 22;
412 #define REG_RD_ADDR_bif_dma_rw_pin7_cfg 188
413 #define REG_WR_ADDR_bif_dma_rw_pin7_cfg 188
417 unsigned int pin0 : 1;
418 unsigned int pin1 : 1;
419 unsigned int pin2 : 1;
420 unsigned int pin3 : 1;
421 unsigned int pin4 : 1;
422 unsigned int pin5 : 1;
423 unsigned int pin6 : 1;
424 unsigned int pin7 : 1;
425 unsigned int dummy1 : 24;
427 #define REG_RD_ADDR_bif_dma_r_pin_stat 192