Go to the documentation of this file. 1 #ifndef __iop_sw_cfg_defs_h
2 #define __iop_sw_cfg_defs_h
15 #define REG_RD( scope, inst, reg ) \
16 REG_READ( reg_##scope##_##reg, \
17 (inst) + REG_RD_ADDR_##scope##_##reg )
21 #define REG_WR( scope, inst, reg, val ) \
22 REG_WRITE( reg_##scope##_##reg, \
23 (inst) + REG_WR_ADDR_##scope##_##reg, (val) )
27 #define REG_RD_VECT( scope, inst, reg, index ) \
28 REG_READ( reg_##scope##_##reg, \
29 (inst) + REG_RD_ADDR_##scope##_##reg + \
30 (index) * STRIDE_##scope##_##reg )
34 #define REG_WR_VECT( scope, inst, reg, index, val ) \
35 REG_WRITE( reg_##scope##_##reg, \
36 (inst) + REG_WR_ADDR_##scope##_##reg + \
37 (index) * STRIDE_##scope##_##reg, (val) )
41 #define REG_RD_INT( scope, inst, reg ) \
42 REG_READ( int, (inst) + REG_RD_ADDR_##scope##_##reg )
46 #define REG_WR_INT( scope, inst, reg, val ) \
47 REG_WRITE( int, (inst) + REG_WR_ADDR_##scope##_##reg, (val) )
50 #ifndef REG_RD_INT_VECT
51 #define REG_RD_INT_VECT( scope, inst, reg, index ) \
52 REG_READ( int, (inst) + REG_RD_ADDR_##scope##_##reg + \
53 (index) * STRIDE_##scope##_##reg )
56 #ifndef REG_WR_INT_VECT
57 #define REG_WR_INT_VECT( scope, inst, reg, index, val ) \
58 REG_WRITE( int, (inst) + REG_WR_ADDR_##scope##_##reg + \
59 (index) * STRIDE_##scope##_##reg, (val) )
63 #define REG_TYPE_CONV( type, orgtype, val ) \
64 ( { union { orgtype o; type n; } r; r.o = val; r.n; } )
68 #define reg_page_size 8192
72 #define REG_ADDR( scope, inst, reg ) \
73 ( (inst) + REG_RD_ADDR_##scope##_##reg )
77 #define REG_ADDR_VECT( scope, inst, reg, index ) \
78 ( (inst) + REG_RD_ADDR_##scope##_##reg + \
79 (index) * STRIDE_##scope##_##reg )
87 unsigned int dummy1 : 30;
89 #define REG_RD_ADDR_iop_sw_cfg_rw_crc_par_owner 0
90 #define REG_WR_ADDR_iop_sw_cfg_rw_crc_par_owner 0
95 unsigned int dummy1 : 30;
97 #define REG_RD_ADDR_iop_sw_cfg_rw_dmc_in_owner 4
98 #define REG_WR_ADDR_iop_sw_cfg_rw_dmc_in_owner 4
103 unsigned int dummy1 : 30;
105 #define REG_RD_ADDR_iop_sw_cfg_rw_dmc_out_owner 8
106 #define REG_WR_ADDR_iop_sw_cfg_rw_dmc_out_owner 8
111 unsigned int dummy1 : 30;
113 #define REG_RD_ADDR_iop_sw_cfg_rw_fifo_in_owner 12
114 #define REG_WR_ADDR_iop_sw_cfg_rw_fifo_in_owner 12
119 unsigned int dummy1 : 30;
121 #define REG_RD_ADDR_iop_sw_cfg_rw_fifo_in_extra_owner 16
122 #define REG_WR_ADDR_iop_sw_cfg_rw_fifo_in_extra_owner 16
127 unsigned int dummy1 : 30;
129 #define REG_RD_ADDR_iop_sw_cfg_rw_fifo_out_owner 20
130 #define REG_WR_ADDR_iop_sw_cfg_rw_fifo_out_owner 20
135 unsigned int dummy1 : 30;
137 #define REG_RD_ADDR_iop_sw_cfg_rw_fifo_out_extra_owner 24
138 #define REG_WR_ADDR_iop_sw_cfg_rw_fifo_out_extra_owner 24
142 unsigned int cfg : 2;
143 unsigned int dummy1 : 30;
145 #define REG_RD_ADDR_iop_sw_cfg_rw_sap_in_owner 28
146 #define REG_WR_ADDR_iop_sw_cfg_rw_sap_in_owner 28
150 unsigned int cfg : 2;
151 unsigned int dummy1 : 30;
153 #define REG_RD_ADDR_iop_sw_cfg_rw_sap_out_owner 32
154 #define REG_WR_ADDR_iop_sw_cfg_rw_sap_out_owner 32
159 unsigned int dummy1 : 30;
161 #define REG_RD_ADDR_iop_sw_cfg_rw_scrc_in_owner 36
162 #define REG_WR_ADDR_iop_sw_cfg_rw_scrc_in_owner 36
167 unsigned int dummy1 : 30;
169 #define REG_RD_ADDR_iop_sw_cfg_rw_scrc_out_owner 40
170 #define REG_WR_ADDR_iop_sw_cfg_rw_scrc_out_owner 40
175 unsigned int dummy1 : 31;
177 #define REG_RD_ADDR_iop_sw_cfg_rw_spu_owner 44
178 #define REG_WR_ADDR_iop_sw_cfg_rw_spu_owner 44
182 unsigned int cfg : 2;
183 unsigned int dummy1 : 30;
185 #define REG_RD_ADDR_iop_sw_cfg_rw_timer_grp0_owner 48
186 #define REG_WR_ADDR_iop_sw_cfg_rw_timer_grp0_owner 48
190 unsigned int cfg : 2;
191 unsigned int dummy1 : 30;
193 #define REG_RD_ADDR_iop_sw_cfg_rw_timer_grp1_owner 52
194 #define REG_WR_ADDR_iop_sw_cfg_rw_timer_grp1_owner 52
198 unsigned int cfg : 2;
199 unsigned int dummy1 : 30;
201 #define REG_RD_ADDR_iop_sw_cfg_rw_trigger_grp0_owner 56
202 #define REG_WR_ADDR_iop_sw_cfg_rw_trigger_grp0_owner 56
206 unsigned int cfg : 2;
207 unsigned int dummy1 : 30;
209 #define REG_RD_ADDR_iop_sw_cfg_rw_trigger_grp1_owner 60
210 #define REG_WR_ADDR_iop_sw_cfg_rw_trigger_grp1_owner 60
214 unsigned int cfg : 2;
215 unsigned int dummy1 : 30;
217 #define REG_RD_ADDR_iop_sw_cfg_rw_trigger_grp2_owner 64
218 #define REG_WR_ADDR_iop_sw_cfg_rw_trigger_grp2_owner 64
222 unsigned int cfg : 2;
223 unsigned int dummy1 : 30;
225 #define REG_RD_ADDR_iop_sw_cfg_rw_trigger_grp3_owner 68
226 #define REG_WR_ADDR_iop_sw_cfg_rw_trigger_grp3_owner 68
230 unsigned int cfg : 2;
231 unsigned int dummy1 : 30;
233 #define REG_RD_ADDR_iop_sw_cfg_rw_trigger_grp4_owner 72
234 #define REG_WR_ADDR_iop_sw_cfg_rw_trigger_grp4_owner 72
238 unsigned int cfg : 2;
239 unsigned int dummy1 : 30;
241 #define REG_RD_ADDR_iop_sw_cfg_rw_trigger_grp5_owner 76
242 #define REG_WR_ADDR_iop_sw_cfg_rw_trigger_grp5_owner 76
246 unsigned int cfg : 2;
247 unsigned int dummy1 : 30;
249 #define REG_RD_ADDR_iop_sw_cfg_rw_trigger_grp6_owner 80
250 #define REG_WR_ADDR_iop_sw_cfg_rw_trigger_grp6_owner 80
254 unsigned int cfg : 2;
255 unsigned int dummy1 : 30;
257 #define REG_RD_ADDR_iop_sw_cfg_rw_trigger_grp7_owner 84
258 #define REG_WR_ADDR_iop_sw_cfg_rw_trigger_grp7_owner 84
262 unsigned int byte0 : 8;
263 unsigned int byte1 : 8;
264 unsigned int byte2 : 8;
265 unsigned int byte3 : 8;
267 #define REG_RD_ADDR_iop_sw_cfg_rw_bus_mask 88
268 #define REG_WR_ADDR_iop_sw_cfg_rw_bus_mask 88
272 unsigned int byte0 : 1;
273 unsigned int byte1 : 1;
274 unsigned int byte2 : 1;
275 unsigned int byte3 : 1;
276 unsigned int dummy1 : 28;
278 #define REG_RD_ADDR_iop_sw_cfg_rw_bus_oe_mask 92
279 #define REG_WR_ADDR_iop_sw_cfg_rw_bus_oe_mask 92
283 unsigned int val : 32;
285 #define REG_RD_ADDR_iop_sw_cfg_rw_gio_mask 96
286 #define REG_WR_ADDR_iop_sw_cfg_rw_gio_mask 96
290 unsigned int val : 32;
292 #define REG_RD_ADDR_iop_sw_cfg_rw_gio_oe_mask 100
293 #define REG_WR_ADDR_iop_sw_cfg_rw_gio_oe_mask 100
297 unsigned int bus_byte0 : 2;
298 unsigned int bus_byte1 : 2;
299 unsigned int bus_byte2 : 2;
300 unsigned int bus_byte3 : 2;
301 unsigned int gio3_0 : 2;
302 unsigned int gio7_4 : 2;
303 unsigned int gio11_8 : 2;
304 unsigned int gio15_12 : 2;
305 unsigned int gio19_16 : 2;
306 unsigned int gio23_20 : 2;
307 unsigned int gio27_24 : 2;
308 unsigned int gio31_28 : 2;
309 unsigned int dummy1 : 8;
311 #define REG_RD_ADDR_iop_sw_cfg_rw_pinmapping 104
312 #define REG_WR_ADDR_iop_sw_cfg_rw_pinmapping 104
316 unsigned int bus_lo : 2;
317 unsigned int bus_hi : 2;
318 unsigned int bus_lo_oe : 2;
319 unsigned int bus_hi_oe : 2;
320 unsigned int dummy1 : 24;
322 #define REG_RD_ADDR_iop_sw_cfg_rw_bus_out_cfg 108
323 #define REG_WR_ADDR_iop_sw_cfg_rw_bus_out_cfg 108
327 unsigned int gio0 : 3;
328 unsigned int gio0_oe : 1;
329 unsigned int gio1 : 3;
330 unsigned int gio1_oe : 1;
331 unsigned int gio2 : 3;
332 unsigned int gio2_oe : 1;
333 unsigned int gio3 : 3;
334 unsigned int gio3_oe : 1;
335 unsigned int dummy1 : 16;
337 #define REG_RD_ADDR_iop_sw_cfg_rw_gio_out_grp0_cfg 112
338 #define REG_WR_ADDR_iop_sw_cfg_rw_gio_out_grp0_cfg 112
342 unsigned int gio4 : 3;
343 unsigned int gio4_oe : 1;
344 unsigned int gio5 : 3;
345 unsigned int gio5_oe : 1;
346 unsigned int gio6 : 3;
347 unsigned int gio6_oe : 1;
348 unsigned int gio7 : 3;
349 unsigned int gio7_oe : 1;
350 unsigned int dummy1 : 16;
352 #define REG_RD_ADDR_iop_sw_cfg_rw_gio_out_grp1_cfg 116
353 #define REG_WR_ADDR_iop_sw_cfg_rw_gio_out_grp1_cfg 116
357 unsigned int gio8 : 3;
358 unsigned int gio8_oe : 1;
359 unsigned int gio9 : 3;
360 unsigned int gio9_oe : 1;
361 unsigned int gio10 : 3;
362 unsigned int gio10_oe : 1;
363 unsigned int gio11 : 3;
364 unsigned int gio11_oe : 1;
365 unsigned int dummy1 : 16;
367 #define REG_RD_ADDR_iop_sw_cfg_rw_gio_out_grp2_cfg 120
368 #define REG_WR_ADDR_iop_sw_cfg_rw_gio_out_grp2_cfg 120
372 unsigned int gio12 : 3;
373 unsigned int gio12_oe : 1;
374 unsigned int gio13 : 3;
375 unsigned int gio13_oe : 1;
376 unsigned int gio14 : 3;
377 unsigned int gio14_oe : 1;
378 unsigned int gio15 : 3;
379 unsigned int gio15_oe : 1;
380 unsigned int dummy1 : 16;
382 #define REG_RD_ADDR_iop_sw_cfg_rw_gio_out_grp3_cfg 124
383 #define REG_WR_ADDR_iop_sw_cfg_rw_gio_out_grp3_cfg 124
387 unsigned int gio16 : 3;
388 unsigned int gio16_oe : 1;
389 unsigned int gio17 : 3;
390 unsigned int gio17_oe : 1;
391 unsigned int gio18 : 3;
392 unsigned int gio18_oe : 1;
393 unsigned int gio19 : 3;
394 unsigned int gio19_oe : 1;
395 unsigned int dummy1 : 16;
397 #define REG_RD_ADDR_iop_sw_cfg_rw_gio_out_grp4_cfg 128
398 #define REG_WR_ADDR_iop_sw_cfg_rw_gio_out_grp4_cfg 128
402 unsigned int gio20 : 3;
403 unsigned int gio20_oe : 1;
404 unsigned int gio21 : 3;
405 unsigned int gio21_oe : 1;
406 unsigned int gio22 : 3;
407 unsigned int gio22_oe : 1;
408 unsigned int gio23 : 3;
409 unsigned int gio23_oe : 1;
410 unsigned int dummy1 : 16;
412 #define REG_RD_ADDR_iop_sw_cfg_rw_gio_out_grp5_cfg 132
413 #define REG_WR_ADDR_iop_sw_cfg_rw_gio_out_grp5_cfg 132
417 unsigned int gio24 : 3;
418 unsigned int gio24_oe : 1;
419 unsigned int gio25 : 3;
420 unsigned int gio25_oe : 1;
421 unsigned int gio26 : 3;
422 unsigned int gio26_oe : 1;
423 unsigned int gio27 : 3;
424 unsigned int gio27_oe : 1;
425 unsigned int dummy1 : 16;
427 #define REG_RD_ADDR_iop_sw_cfg_rw_gio_out_grp6_cfg 136
428 #define REG_WR_ADDR_iop_sw_cfg_rw_gio_out_grp6_cfg 136
432 unsigned int gio28 : 3;
433 unsigned int gio28_oe : 1;
434 unsigned int gio29 : 3;
435 unsigned int gio29_oe : 1;
436 unsigned int gio30 : 3;
437 unsigned int gio30_oe : 1;
438 unsigned int gio31 : 3;
439 unsigned int gio31_oe : 1;
440 unsigned int dummy1 : 16;
442 #define REG_RD_ADDR_iop_sw_cfg_rw_gio_out_grp7_cfg 140
443 #define REG_WR_ADDR_iop_sw_cfg_rw_gio_out_grp7_cfg 140
447 unsigned int bus0_in : 1;
448 unsigned int bus1_in : 1;
449 unsigned int dummy1 : 30;
451 #define REG_RD_ADDR_iop_sw_cfg_rw_spu_cfg 144
452 #define REG_WR_ADDR_iop_sw_cfg_rw_spu_cfg 144
456 unsigned int ext_clk : 3;
457 unsigned int tmr0_en : 2;
458 unsigned int tmr1_en : 2;
459 unsigned int tmr2_en : 2;
460 unsigned int tmr3_en : 2;
461 unsigned int tmr0_dis : 2;
462 unsigned int tmr1_dis : 2;
463 unsigned int tmr2_dis : 2;
464 unsigned int tmr3_dis : 2;
465 unsigned int dummy1 : 13;
467 #define REG_RD_ADDR_iop_sw_cfg_rw_timer_grp0_cfg 148
468 #define REG_WR_ADDR_iop_sw_cfg_rw_timer_grp0_cfg 148
472 unsigned int ext_clk : 3;
473 unsigned int tmr0_en : 2;
474 unsigned int tmr1_en : 2;
475 unsigned int tmr2_en : 2;
476 unsigned int tmr3_en : 2;
477 unsigned int tmr0_dis : 2;
478 unsigned int tmr1_dis : 2;
479 unsigned int tmr2_dis : 2;
480 unsigned int tmr3_dis : 2;
481 unsigned int dummy1 : 13;
483 #define REG_RD_ADDR_iop_sw_cfg_rw_timer_grp1_cfg 152
484 #define REG_WR_ADDR_iop_sw_cfg_rw_timer_grp1_cfg 152
488 unsigned int grp0_dis : 1;
489 unsigned int grp0_en : 1;
490 unsigned int grp1_dis : 1;
491 unsigned int grp1_en : 1;
492 unsigned int grp2_dis : 1;
493 unsigned int grp2_en : 1;
494 unsigned int grp3_dis : 1;
495 unsigned int grp3_en : 1;
496 unsigned int grp4_dis : 1;
497 unsigned int grp4_en : 1;
498 unsigned int grp5_dis : 1;
499 unsigned int grp5_en : 1;
500 unsigned int grp6_dis : 1;
501 unsigned int grp6_en : 1;
502 unsigned int grp7_dis : 1;
503 unsigned int grp7_en : 1;
504 unsigned int dummy1 : 16;
506 #define REG_RD_ADDR_iop_sw_cfg_rw_trigger_grps_cfg 156
507 #define REG_WR_ADDR_iop_sw_cfg_rw_trigger_grps_cfg 156
511 unsigned int out_strb : 4;
512 unsigned int in_src : 2;
513 unsigned int in_size : 3;
514 unsigned int in_last : 2;
515 unsigned int in_strb : 4;
516 unsigned int dummy1 : 17;
518 #define REG_RD_ADDR_iop_sw_cfg_rw_pdp_cfg 160
519 #define REG_WR_ADDR_iop_sw_cfg_rw_pdp_cfg 160
523 unsigned int sdp_out_strb : 3;
524 unsigned int sdp_in_data : 3;
525 unsigned int sdp_in_last : 2;
526 unsigned int sdp_in_strb : 3;
527 unsigned int dummy1 : 21;
529 #define REG_RD_ADDR_iop_sw_cfg_rw_sdp_cfg 164
530 #define REG_WR_ADDR_iop_sw_cfg_rw_sdp_cfg 164