Go to the documentation of this file. 1 #ifndef __iop_sw_spu_defs_h
2 #define __iop_sw_spu_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 )
89 unsigned int keep_owner : 1;
92 unsigned int wr_spu0_mem : 1;
93 unsigned int wr_spu1_mem : 1;
94 unsigned int dummy1 : 24;
96 #define REG_RD_ADDR_iop_sw_spu_rw_mc_ctrl 0
97 #define REG_WR_ADDR_iop_sw_spu_rw_mc_ctrl 0
103 #define REG_RD_ADDR_iop_sw_spu_rw_mc_data 4
104 #define REG_WR_ADDR_iop_sw_spu_rw_mc_data 4
108 #define REG_RD_ADDR_iop_sw_spu_rw_mc_addr 8
109 #define REG_WR_ADDR_iop_sw_spu_rw_mc_addr 8
113 #define REG_RD_ADDR_iop_sw_spu_rs_mc_data 12
117 #define REG_RD_ADDR_iop_sw_spu_r_mc_data 16
121 unsigned int busy_cpu : 1;
122 unsigned int busy_mpu : 1;
123 unsigned int busy_spu0 : 1;
124 unsigned int busy_spu1 : 1;
125 unsigned int owned_by_cpu : 1;
126 unsigned int owned_by_mpu : 1;
127 unsigned int owned_by_spu0 : 1;
128 unsigned int owned_by_spu1 : 1;
129 unsigned int dummy1 : 24;
131 #define REG_RD_ADDR_iop_sw_spu_r_mc_stat 20
135 unsigned int byte0 : 8;
136 unsigned int byte1 : 8;
137 unsigned int byte2 : 8;
138 unsigned int byte3 : 8;
140 #define REG_RD_ADDR_iop_sw_spu_rw_bus0_clr_mask 24
141 #define REG_WR_ADDR_iop_sw_spu_rw_bus0_clr_mask 24
145 unsigned int byte0 : 8;
146 unsigned int byte1 : 8;
147 unsigned int byte2 : 8;
148 unsigned int byte3 : 8;
150 #define REG_RD_ADDR_iop_sw_spu_rw_bus0_set_mask 28
151 #define REG_WR_ADDR_iop_sw_spu_rw_bus0_set_mask 28
155 unsigned int byte0 : 1;
156 unsigned int byte1 : 1;
157 unsigned int byte2 : 1;
158 unsigned int byte3 : 1;
159 unsigned int dummy1 : 28;
161 #define REG_RD_ADDR_iop_sw_spu_rw_bus0_oe_clr_mask 32
162 #define REG_WR_ADDR_iop_sw_spu_rw_bus0_oe_clr_mask 32
166 unsigned int byte0 : 1;
167 unsigned int byte1 : 1;
168 unsigned int byte2 : 1;
169 unsigned int byte3 : 1;
170 unsigned int dummy1 : 28;
172 #define REG_RD_ADDR_iop_sw_spu_rw_bus0_oe_set_mask 36
173 #define REG_WR_ADDR_iop_sw_spu_rw_bus0_oe_set_mask 36
177 #define REG_RD_ADDR_iop_sw_spu_r_bus0_in 40
181 unsigned int byte0 : 8;
182 unsigned int byte1 : 8;
183 unsigned int byte2 : 8;
184 unsigned int byte3 : 8;
186 #define REG_RD_ADDR_iop_sw_spu_rw_bus1_clr_mask 44
187 #define REG_WR_ADDR_iop_sw_spu_rw_bus1_clr_mask 44
191 unsigned int byte0 : 8;
192 unsigned int byte1 : 8;
193 unsigned int byte2 : 8;
194 unsigned int byte3 : 8;
196 #define REG_RD_ADDR_iop_sw_spu_rw_bus1_set_mask 48
197 #define REG_WR_ADDR_iop_sw_spu_rw_bus1_set_mask 48
201 unsigned int byte0 : 1;
202 unsigned int byte1 : 1;
203 unsigned int byte2 : 1;
204 unsigned int byte3 : 1;
205 unsigned int dummy1 : 28;
207 #define REG_RD_ADDR_iop_sw_spu_rw_bus1_oe_clr_mask 52
208 #define REG_WR_ADDR_iop_sw_spu_rw_bus1_oe_clr_mask 52
212 unsigned int byte0 : 1;
213 unsigned int byte1 : 1;
214 unsigned int byte2 : 1;
215 unsigned int byte3 : 1;
216 unsigned int dummy1 : 28;
218 #define REG_RD_ADDR_iop_sw_spu_rw_bus1_oe_set_mask 56
219 #define REG_WR_ADDR_iop_sw_spu_rw_bus1_oe_set_mask 56
223 #define REG_RD_ADDR_iop_sw_spu_r_bus1_in 60
229 #define REG_RD_ADDR_iop_sw_spu_rw_gio_clr_mask 64
230 #define REG_WR_ADDR_iop_sw_spu_rw_gio_clr_mask 64
236 #define REG_RD_ADDR_iop_sw_spu_rw_gio_set_mask 68
237 #define REG_WR_ADDR_iop_sw_spu_rw_gio_set_mask 68
243 #define REG_RD_ADDR_iop_sw_spu_rw_gio_oe_clr_mask 72
244 #define REG_WR_ADDR_iop_sw_spu_rw_gio_oe_clr_mask 72
250 #define REG_RD_ADDR_iop_sw_spu_rw_gio_oe_set_mask 76
251 #define REG_WR_ADDR_iop_sw_spu_rw_gio_oe_set_mask 76
255 #define REG_RD_ADDR_iop_sw_spu_r_gio_in 80
259 unsigned int byte0 : 8;
260 unsigned int byte1 : 8;
261 unsigned int dummy1 : 16;
263 #define REG_RD_ADDR_iop_sw_spu_rw_bus0_clr_mask_lo 84
264 #define REG_WR_ADDR_iop_sw_spu_rw_bus0_clr_mask_lo 84
268 unsigned int byte2 : 8;
269 unsigned int byte3 : 8;
270 unsigned int dummy1 : 16;
272 #define REG_RD_ADDR_iop_sw_spu_rw_bus0_clr_mask_hi 88
273 #define REG_WR_ADDR_iop_sw_spu_rw_bus0_clr_mask_hi 88
277 unsigned int byte0 : 8;
278 unsigned int byte1 : 8;
279 unsigned int dummy1 : 16;
281 #define REG_RD_ADDR_iop_sw_spu_rw_bus0_set_mask_lo 92
282 #define REG_WR_ADDR_iop_sw_spu_rw_bus0_set_mask_lo 92
286 unsigned int byte2 : 8;
287 unsigned int byte3 : 8;
288 unsigned int dummy1 : 16;
290 #define REG_RD_ADDR_iop_sw_spu_rw_bus0_set_mask_hi 96
291 #define REG_WR_ADDR_iop_sw_spu_rw_bus0_set_mask_hi 96
295 unsigned int byte0 : 8;
296 unsigned int byte1 : 8;
297 unsigned int dummy1 : 16;
299 #define REG_RD_ADDR_iop_sw_spu_rw_bus1_clr_mask_lo 100
300 #define REG_WR_ADDR_iop_sw_spu_rw_bus1_clr_mask_lo 100
304 unsigned int byte2 : 8;
305 unsigned int byte3 : 8;
306 unsigned int dummy1 : 16;
308 #define REG_RD_ADDR_iop_sw_spu_rw_bus1_clr_mask_hi 104
309 #define REG_WR_ADDR_iop_sw_spu_rw_bus1_clr_mask_hi 104
313 unsigned int byte0 : 8;
314 unsigned int byte1 : 8;
315 unsigned int dummy1 : 16;
317 #define REG_RD_ADDR_iop_sw_spu_rw_bus1_set_mask_lo 108
318 #define REG_WR_ADDR_iop_sw_spu_rw_bus1_set_mask_lo 108
322 unsigned int byte2 : 8;
323 unsigned int byte3 : 8;
324 unsigned int dummy1 : 16;
326 #define REG_RD_ADDR_iop_sw_spu_rw_bus1_set_mask_hi 112
327 #define REG_WR_ADDR_iop_sw_spu_rw_bus1_set_mask_hi 112
332 unsigned int dummy1 : 16;
334 #define REG_RD_ADDR_iop_sw_spu_rw_gio_clr_mask_lo 116
335 #define REG_WR_ADDR_iop_sw_spu_rw_gio_clr_mask_lo 116
340 unsigned int dummy1 : 16;
342 #define REG_RD_ADDR_iop_sw_spu_rw_gio_clr_mask_hi 120
343 #define REG_WR_ADDR_iop_sw_spu_rw_gio_clr_mask_hi 120
348 unsigned int dummy1 : 16;
350 #define REG_RD_ADDR_iop_sw_spu_rw_gio_set_mask_lo 124
351 #define REG_WR_ADDR_iop_sw_spu_rw_gio_set_mask_lo 124
356 unsigned int dummy1 : 16;
358 #define REG_RD_ADDR_iop_sw_spu_rw_gio_set_mask_hi 128
359 #define REG_WR_ADDR_iop_sw_spu_rw_gio_set_mask_hi 128
364 unsigned int dummy1 : 16;
366 #define REG_RD_ADDR_iop_sw_spu_rw_gio_oe_clr_mask_lo 132
367 #define REG_WR_ADDR_iop_sw_spu_rw_gio_oe_clr_mask_lo 132
372 unsigned int dummy1 : 16;
374 #define REG_RD_ADDR_iop_sw_spu_rw_gio_oe_clr_mask_hi 136
375 #define REG_WR_ADDR_iop_sw_spu_rw_gio_oe_clr_mask_hi 136
380 unsigned int dummy1 : 16;
382 #define REG_RD_ADDR_iop_sw_spu_rw_gio_oe_set_mask_lo 140
383 #define REG_WR_ADDR_iop_sw_spu_rw_gio_oe_set_mask_lo 140
388 unsigned int dummy1 : 16;
390 #define REG_RD_ADDR_iop_sw_spu_rw_gio_oe_set_mask_hi 144
391 #define REG_WR_ADDR_iop_sw_spu_rw_gio_oe_set_mask_hi 144
395 unsigned int intr0 : 1;
396 unsigned int intr1 : 1;
397 unsigned int intr2 : 1;
398 unsigned int intr3 : 1;
399 unsigned int intr4 : 1;
400 unsigned int intr5 : 1;
401 unsigned int intr6 : 1;
402 unsigned int intr7 : 1;
403 unsigned int intr8 : 1;
404 unsigned int intr9 : 1;
405 unsigned int intr10 : 1;
406 unsigned int intr11 : 1;
407 unsigned int intr12 : 1;
408 unsigned int intr13 : 1;
409 unsigned int intr14 : 1;
410 unsigned int intr15 : 1;
411 unsigned int dummy1 : 16;
413 #define REG_RD_ADDR_iop_sw_spu_rw_cpu_intr 148
414 #define REG_WR_ADDR_iop_sw_spu_rw_cpu_intr 148
418 unsigned int intr0 : 1;
419 unsigned int intr1 : 1;
420 unsigned int intr2 : 1;
421 unsigned int intr3 : 1;
422 unsigned int intr4 : 1;
423 unsigned int intr5 : 1;
424 unsigned int intr6 : 1;
425 unsigned int intr7 : 1;
426 unsigned int intr8 : 1;
427 unsigned int intr9 : 1;
428 unsigned int intr10 : 1;
429 unsigned int intr11 : 1;
430 unsigned int intr12 : 1;
431 unsigned int intr13 : 1;
432 unsigned int intr14 : 1;
433 unsigned int intr15 : 1;
434 unsigned int dummy1 : 16;
436 #define REG_RD_ADDR_iop_sw_spu_r_cpu_intr 152
440 unsigned int trigger_grp0 : 1;
441 unsigned int trigger_grp1 : 1;
442 unsigned int trigger_grp2 : 1;
443 unsigned int trigger_grp3 : 1;
444 unsigned int trigger_grp4 : 1;
445 unsigned int trigger_grp5 : 1;
446 unsigned int trigger_grp6 : 1;
447 unsigned int trigger_grp7 : 1;
448 unsigned int timer_grp0 : 1;
449 unsigned int timer_grp1 : 1;
450 unsigned int timer_grp2 : 1;
451 unsigned int timer_grp3 : 1;
452 unsigned int fifo_out0 : 1;
453 unsigned int fifo_out0_extra : 1;
454 unsigned int fifo_in0 : 1;
455 unsigned int fifo_in0_extra : 1;
456 unsigned int fifo_out1 : 1;
457 unsigned int fifo_out1_extra : 1;
458 unsigned int fifo_in1 : 1;
459 unsigned int fifo_in1_extra : 1;
460 unsigned int dmc_out0 : 1;
461 unsigned int dmc_in0 : 1;
462 unsigned int dmc_out1 : 1;
463 unsigned int dmc_in1 : 1;
464 unsigned int dummy1 : 8;
466 #define REG_RD_ADDR_iop_sw_spu_r_hw_intr 156
470 unsigned int intr0 : 1;
471 unsigned int intr1 : 1;
472 unsigned int intr2 : 1;
473 unsigned int intr3 : 1;
474 unsigned int intr4 : 1;
475 unsigned int intr5 : 1;
476 unsigned int intr6 : 1;
477 unsigned int intr7 : 1;
478 unsigned int intr8 : 1;
479 unsigned int intr9 : 1;
480 unsigned int intr10 : 1;
481 unsigned int intr11 : 1;
482 unsigned int intr12 : 1;
483 unsigned int intr13 : 1;
484 unsigned int intr14 : 1;
485 unsigned int intr15 : 1;
486 unsigned int dummy1 : 16;
488 #define REG_RD_ADDR_iop_sw_spu_rw_mpu_intr 160
489 #define REG_WR_ADDR_iop_sw_spu_rw_mpu_intr 160
493 unsigned int intr0 : 1;
494 unsigned int intr1 : 1;
495 unsigned int intr2 : 1;
496 unsigned int intr3 : 1;
497 unsigned int intr4 : 1;
498 unsigned int intr5 : 1;
499 unsigned int intr6 : 1;
500 unsigned int intr7 : 1;
501 unsigned int intr8 : 1;
502 unsigned int intr9 : 1;
503 unsigned int intr10 : 1;
504 unsigned int intr11 : 1;
505 unsigned int intr12 : 1;
506 unsigned int intr13 : 1;
507 unsigned int intr14 : 1;
508 unsigned int intr15 : 1;
509 unsigned int other_spu_intr0 : 1;
510 unsigned int other_spu_intr1 : 1;
511 unsigned int other_spu_intr2 : 1;
512 unsigned int other_spu_intr3 : 1;
513 unsigned int other_spu_intr4 : 1;
514 unsigned int other_spu_intr5 : 1;
515 unsigned int other_spu_intr6 : 1;
516 unsigned int other_spu_intr7 : 1;
517 unsigned int other_spu_intr8 : 1;
518 unsigned int other_spu_intr9 : 1;
519 unsigned int other_spu_intr10 : 1;
520 unsigned int other_spu_intr11 : 1;
521 unsigned int other_spu_intr12 : 1;
522 unsigned int other_spu_intr13 : 1;
523 unsigned int other_spu_intr14 : 1;
524 unsigned int other_spu_intr15 : 1;
526 #define REG_RD_ADDR_iop_sw_spu_r_mpu_intr 164