diff options
Diffstat (limited to 'drivers/gpu/nvgpu/include/nvgpu/hw/gv11b/hw_ram_gv11b.h')
-rw-r--r-- | drivers/gpu/nvgpu/include/nvgpu/hw/gv11b/hw_ram_gv11b.h | 765 |
1 files changed, 765 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/include/nvgpu/hw/gv11b/hw_ram_gv11b.h b/drivers/gpu/nvgpu/include/nvgpu/hw/gv11b/hw_ram_gv11b.h new file mode 100644 index 00000000..bcbb7b81 --- /dev/null +++ b/drivers/gpu/nvgpu/include/nvgpu/hw/gv11b/hw_ram_gv11b.h | |||
@@ -0,0 +1,765 @@ | |||
1 | /* | ||
2 | * Copyright (c) 2016-2017, NVIDIA CORPORATION. All rights reserved. | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or modify it | ||
5 | * under the terms and conditions of the GNU General Public License, | ||
6 | * version 2, as published by the Free Software Foundation. | ||
7 | * | ||
8 | * This program is distributed in the hope it will be useful, but WITHOUT | ||
9 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
10 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | ||
11 | * more details. | ||
12 | * | ||
13 | * You should have received a copy of the GNU General Public License | ||
14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
15 | */ | ||
16 | /* | ||
17 | * Function naming determines intended use: | ||
18 | * | ||
19 | * <x>_r(void) : Returns the offset for register <x>. | ||
20 | * | ||
21 | * <x>_o(void) : Returns the offset for element <x>. | ||
22 | * | ||
23 | * <x>_w(void) : Returns the word offset for word (4 byte) element <x>. | ||
24 | * | ||
25 | * <x>_<y>_s(void) : Returns size of field <y> of register <x> in bits. | ||
26 | * | ||
27 | * <x>_<y>_f(u32 v) : Returns a value based on 'v' which has been shifted | ||
28 | * and masked to place it at field <y> of register <x>. This value | ||
29 | * can be |'d with others to produce a full register value for | ||
30 | * register <x>. | ||
31 | * | ||
32 | * <x>_<y>_m(void) : Returns a mask for field <y> of register <x>. This | ||
33 | * value can be ~'d and then &'d to clear the value of field <y> for | ||
34 | * register <x>. | ||
35 | * | ||
36 | * <x>_<y>_<z>_f(void) : Returns the constant value <z> after being shifted | ||
37 | * to place it at field <y> of register <x>. This value can be |'d | ||
38 | * with others to produce a full register value for <x>. | ||
39 | * | ||
40 | * <x>_<y>_v(u32 r) : Returns the value of field <y> from a full register | ||
41 | * <x> value 'r' after being shifted to place its LSB at bit 0. | ||
42 | * This value is suitable for direct comparison with other unshifted | ||
43 | * values appropriate for use in field <y> of register <x>. | ||
44 | * | ||
45 | * <x>_<y>_<z>_v(void) : Returns the constant value for <z> defined for | ||
46 | * field <y> of register <x>. This value is suitable for direct | ||
47 | * comparison with unshifted values appropriate for use in field <y> | ||
48 | * of register <x>. | ||
49 | */ | ||
50 | #ifndef _hw_ram_gv11b_h_ | ||
51 | #define _hw_ram_gv11b_h_ | ||
52 | |||
53 | static inline u32 ram_in_ramfc_s(void) | ||
54 | { | ||
55 | return 4096; | ||
56 | } | ||
57 | static inline u32 ram_in_ramfc_w(void) | ||
58 | { | ||
59 | return 0; | ||
60 | } | ||
61 | static inline u32 ram_in_page_dir_base_target_f(u32 v) | ||
62 | { | ||
63 | return (v & 0x3) << 0; | ||
64 | } | ||
65 | static inline u32 ram_in_page_dir_base_target_w(void) | ||
66 | { | ||
67 | return 128; | ||
68 | } | ||
69 | static inline u32 ram_in_page_dir_base_target_vid_mem_f(void) | ||
70 | { | ||
71 | return 0x0; | ||
72 | } | ||
73 | static inline u32 ram_in_page_dir_base_target_sys_mem_coh_f(void) | ||
74 | { | ||
75 | return 0x2; | ||
76 | } | ||
77 | static inline u32 ram_in_page_dir_base_target_sys_mem_ncoh_f(void) | ||
78 | { | ||
79 | return 0x3; | ||
80 | } | ||
81 | static inline u32 ram_in_page_dir_base_vol_w(void) | ||
82 | { | ||
83 | return 128; | ||
84 | } | ||
85 | static inline u32 ram_in_page_dir_base_vol_true_f(void) | ||
86 | { | ||
87 | return 0x4; | ||
88 | } | ||
89 | static inline u32 ram_in_page_dir_base_vol_false_f(void) | ||
90 | { | ||
91 | return 0x0; | ||
92 | } | ||
93 | static inline u32 ram_in_page_dir_base_fault_replay_tex_f(u32 v) | ||
94 | { | ||
95 | return (v & 0x1) << 4; | ||
96 | } | ||
97 | static inline u32 ram_in_page_dir_base_fault_replay_tex_m(void) | ||
98 | { | ||
99 | return 0x1 << 4; | ||
100 | } | ||
101 | static inline u32 ram_in_page_dir_base_fault_replay_tex_w(void) | ||
102 | { | ||
103 | return 128; | ||
104 | } | ||
105 | static inline u32 ram_in_page_dir_base_fault_replay_tex_true_f(void) | ||
106 | { | ||
107 | return 0x10; | ||
108 | } | ||
109 | static inline u32 ram_in_page_dir_base_fault_replay_gcc_f(u32 v) | ||
110 | { | ||
111 | return (v & 0x1) << 5; | ||
112 | } | ||
113 | static inline u32 ram_in_page_dir_base_fault_replay_gcc_m(void) | ||
114 | { | ||
115 | return 0x1 << 5; | ||
116 | } | ||
117 | static inline u32 ram_in_page_dir_base_fault_replay_gcc_w(void) | ||
118 | { | ||
119 | return 128; | ||
120 | } | ||
121 | static inline u32 ram_in_page_dir_base_fault_replay_gcc_true_f(void) | ||
122 | { | ||
123 | return 0x20; | ||
124 | } | ||
125 | static inline u32 ram_in_big_page_size_f(u32 v) | ||
126 | { | ||
127 | return (v & 0x1) << 11; | ||
128 | } | ||
129 | static inline u32 ram_in_big_page_size_m(void) | ||
130 | { | ||
131 | return 0x1 << 11; | ||
132 | } | ||
133 | static inline u32 ram_in_big_page_size_w(void) | ||
134 | { | ||
135 | return 128; | ||
136 | } | ||
137 | static inline u32 ram_in_big_page_size_128kb_f(void) | ||
138 | { | ||
139 | return 0x0; | ||
140 | } | ||
141 | static inline u32 ram_in_big_page_size_64kb_f(void) | ||
142 | { | ||
143 | return 0x800; | ||
144 | } | ||
145 | static inline u32 ram_in_page_dir_base_lo_f(u32 v) | ||
146 | { | ||
147 | return (v & 0xfffff) << 12; | ||
148 | } | ||
149 | static inline u32 ram_in_page_dir_base_lo_w(void) | ||
150 | { | ||
151 | return 128; | ||
152 | } | ||
153 | static inline u32 ram_in_page_dir_base_hi_f(u32 v) | ||
154 | { | ||
155 | return (v & 0xffffffff) << 0; | ||
156 | } | ||
157 | static inline u32 ram_in_page_dir_base_hi_w(void) | ||
158 | { | ||
159 | return 129; | ||
160 | } | ||
161 | static inline u32 ram_in_engine_cs_w(void) | ||
162 | { | ||
163 | return 132; | ||
164 | } | ||
165 | static inline u32 ram_in_engine_cs_wfi_v(void) | ||
166 | { | ||
167 | return 0x00000000; | ||
168 | } | ||
169 | static inline u32 ram_in_engine_cs_wfi_f(void) | ||
170 | { | ||
171 | return 0x0; | ||
172 | } | ||
173 | static inline u32 ram_in_engine_cs_fg_v(void) | ||
174 | { | ||
175 | return 0x00000001; | ||
176 | } | ||
177 | static inline u32 ram_in_engine_cs_fg_f(void) | ||
178 | { | ||
179 | return 0x8; | ||
180 | } | ||
181 | static inline u32 ram_in_engine_wfi_mode_f(u32 v) | ||
182 | { | ||
183 | return (v & 0x1) << 2; | ||
184 | } | ||
185 | static inline u32 ram_in_engine_wfi_mode_w(void) | ||
186 | { | ||
187 | return 132; | ||
188 | } | ||
189 | static inline u32 ram_in_engine_wfi_mode_physical_v(void) | ||
190 | { | ||
191 | return 0x00000000; | ||
192 | } | ||
193 | static inline u32 ram_in_engine_wfi_mode_virtual_v(void) | ||
194 | { | ||
195 | return 0x00000001; | ||
196 | } | ||
197 | static inline u32 ram_in_engine_wfi_target_f(u32 v) | ||
198 | { | ||
199 | return (v & 0x3) << 0; | ||
200 | } | ||
201 | static inline u32 ram_in_engine_wfi_target_w(void) | ||
202 | { | ||
203 | return 132; | ||
204 | } | ||
205 | static inline u32 ram_in_engine_wfi_target_sys_mem_coh_v(void) | ||
206 | { | ||
207 | return 0x00000002; | ||
208 | } | ||
209 | static inline u32 ram_in_engine_wfi_target_sys_mem_ncoh_v(void) | ||
210 | { | ||
211 | return 0x00000003; | ||
212 | } | ||
213 | static inline u32 ram_in_engine_wfi_target_local_mem_v(void) | ||
214 | { | ||
215 | return 0x00000000; | ||
216 | } | ||
217 | static inline u32 ram_in_engine_wfi_ptr_lo_f(u32 v) | ||
218 | { | ||
219 | return (v & 0xfffff) << 12; | ||
220 | } | ||
221 | static inline u32 ram_in_engine_wfi_ptr_lo_w(void) | ||
222 | { | ||
223 | return 132; | ||
224 | } | ||
225 | static inline u32 ram_in_engine_wfi_ptr_hi_f(u32 v) | ||
226 | { | ||
227 | return (v & 0xff) << 0; | ||
228 | } | ||
229 | static inline u32 ram_in_engine_wfi_ptr_hi_w(void) | ||
230 | { | ||
231 | return 133; | ||
232 | } | ||
233 | static inline u32 ram_in_engine_wfi_veid_f(u32 v) | ||
234 | { | ||
235 | return (v & 0x3f) << 0; | ||
236 | } | ||
237 | static inline u32 ram_in_engine_wfi_veid_w(void) | ||
238 | { | ||
239 | return 134; | ||
240 | } | ||
241 | static inline u32 ram_in_eng_method_buffer_addr_lo_f(u32 v) | ||
242 | { | ||
243 | return (v & 0xffffffff) << 0; | ||
244 | } | ||
245 | static inline u32 ram_in_eng_method_buffer_addr_lo_w(void) | ||
246 | { | ||
247 | return 136; | ||
248 | } | ||
249 | static inline u32 ram_in_eng_method_buffer_addr_hi_f(u32 v) | ||
250 | { | ||
251 | return (v & 0x1ffff) << 0; | ||
252 | } | ||
253 | static inline u32 ram_in_eng_method_buffer_addr_hi_w(void) | ||
254 | { | ||
255 | return 137; | ||
256 | } | ||
257 | static inline u32 ram_in_sc_page_dir_base_target_f(u32 v, u32 i) | ||
258 | { | ||
259 | return (v & 0x3) << (0 + i*0); | ||
260 | } | ||
261 | static inline u32 ram_in_sc_page_dir_base_target__size_1_v(void) | ||
262 | { | ||
263 | return 0x00000040; | ||
264 | } | ||
265 | static inline u32 ram_in_sc_page_dir_base_target_vid_mem_v(void) | ||
266 | { | ||
267 | return 0x00000000; | ||
268 | } | ||
269 | static inline u32 ram_in_sc_page_dir_base_target_invalid_v(void) | ||
270 | { | ||
271 | return 0x00000001; | ||
272 | } | ||
273 | static inline u32 ram_in_sc_page_dir_base_target_sys_mem_coh_v(void) | ||
274 | { | ||
275 | return 0x00000002; | ||
276 | } | ||
277 | static inline u32 ram_in_sc_page_dir_base_target_sys_mem_ncoh_v(void) | ||
278 | { | ||
279 | return 0x00000003; | ||
280 | } | ||
281 | static inline u32 ram_in_sc_page_dir_base_vol_f(u32 v, u32 i) | ||
282 | { | ||
283 | return (v & 0x1) << (2 + i*0); | ||
284 | } | ||
285 | static inline u32 ram_in_sc_page_dir_base_vol__size_1_v(void) | ||
286 | { | ||
287 | return 0x00000040; | ||
288 | } | ||
289 | static inline u32 ram_in_sc_page_dir_base_vol_true_v(void) | ||
290 | { | ||
291 | return 0x00000001; | ||
292 | } | ||
293 | static inline u32 ram_in_sc_page_dir_base_vol_false_v(void) | ||
294 | { | ||
295 | return 0x00000000; | ||
296 | } | ||
297 | static inline u32 ram_in_sc_page_dir_base_fault_replay_tex_f(u32 v, u32 i) | ||
298 | { | ||
299 | return (v & 0x1) << (4 + i*0); | ||
300 | } | ||
301 | static inline u32 ram_in_sc_page_dir_base_fault_replay_tex__size_1_v(void) | ||
302 | { | ||
303 | return 0x00000040; | ||
304 | } | ||
305 | static inline u32 ram_in_sc_page_dir_base_fault_replay_tex_enabled_v(void) | ||
306 | { | ||
307 | return 0x00000001; | ||
308 | } | ||
309 | static inline u32 ram_in_sc_page_dir_base_fault_replay_tex_disabled_v(void) | ||
310 | { | ||
311 | return 0x00000000; | ||
312 | } | ||
313 | static inline u32 ram_in_sc_page_dir_base_fault_replay_gcc_f(u32 v, u32 i) | ||
314 | { | ||
315 | return (v & 0x1) << (5 + i*0); | ||
316 | } | ||
317 | static inline u32 ram_in_sc_page_dir_base_fault_replay_gcc__size_1_v(void) | ||
318 | { | ||
319 | return 0x00000040; | ||
320 | } | ||
321 | static inline u32 ram_in_sc_page_dir_base_fault_replay_gcc_enabled_v(void) | ||
322 | { | ||
323 | return 0x00000001; | ||
324 | } | ||
325 | static inline u32 ram_in_sc_page_dir_base_fault_replay_gcc_disabled_v(void) | ||
326 | { | ||
327 | return 0x00000000; | ||
328 | } | ||
329 | static inline u32 ram_in_sc_use_ver2_pt_format_f(u32 v, u32 i) | ||
330 | { | ||
331 | return (v & 0x1) << (10 + i*0); | ||
332 | } | ||
333 | static inline u32 ram_in_sc_use_ver2_pt_format__size_1_v(void) | ||
334 | { | ||
335 | return 0x00000040; | ||
336 | } | ||
337 | static inline u32 ram_in_sc_use_ver2_pt_format_false_v(void) | ||
338 | { | ||
339 | return 0x00000000; | ||
340 | } | ||
341 | static inline u32 ram_in_sc_use_ver2_pt_format_true_v(void) | ||
342 | { | ||
343 | return 0x00000001; | ||
344 | } | ||
345 | static inline u32 ram_in_sc_big_page_size_f(u32 v, u32 i) | ||
346 | { | ||
347 | return (v & 0x1) << (11 + i*0); | ||
348 | } | ||
349 | static inline u32 ram_in_sc_big_page_size__size_1_v(void) | ||
350 | { | ||
351 | return 0x00000040; | ||
352 | } | ||
353 | static inline u32 ram_in_sc_big_page_size_64kb_v(void) | ||
354 | { | ||
355 | return 0x00000001; | ||
356 | } | ||
357 | static inline u32 ram_in_sc_page_dir_base_lo_f(u32 v, u32 i) | ||
358 | { | ||
359 | return (v & 0xfffff) << (12 + i*0); | ||
360 | } | ||
361 | static inline u32 ram_in_sc_page_dir_base_lo__size_1_v(void) | ||
362 | { | ||
363 | return 0x00000040; | ||
364 | } | ||
365 | static inline u32 ram_in_sc_page_dir_base_hi_f(u32 v, u32 i) | ||
366 | { | ||
367 | return (v & 0xffffffff) << (0 + i*0); | ||
368 | } | ||
369 | static inline u32 ram_in_sc_page_dir_base_hi__size_1_v(void) | ||
370 | { | ||
371 | return 0x00000040; | ||
372 | } | ||
373 | static inline u32 ram_in_sc_page_dir_base_target_0_f(u32 v) | ||
374 | { | ||
375 | return (v & 0x3) << 0; | ||
376 | } | ||
377 | static inline u32 ram_in_sc_page_dir_base_target_0_w(void) | ||
378 | { | ||
379 | return 168; | ||
380 | } | ||
381 | static inline u32 ram_in_sc_page_dir_base_vol_0_f(u32 v) | ||
382 | { | ||
383 | return (v & 0x1) << 2; | ||
384 | } | ||
385 | static inline u32 ram_in_sc_page_dir_base_vol_0_w(void) | ||
386 | { | ||
387 | return 168; | ||
388 | } | ||
389 | static inline u32 ram_in_sc_page_dir_base_fault_replay_tex_0_f(u32 v) | ||
390 | { | ||
391 | return (v & 0x1) << 4; | ||
392 | } | ||
393 | static inline u32 ram_in_sc_page_dir_base_fault_replay_tex_0_w(void) | ||
394 | { | ||
395 | return 168; | ||
396 | } | ||
397 | static inline u32 ram_in_sc_page_dir_base_fault_replay_gcc_0_f(u32 v) | ||
398 | { | ||
399 | return (v & 0x1) << 5; | ||
400 | } | ||
401 | static inline u32 ram_in_sc_page_dir_base_fault_replay_gcc_0_w(void) | ||
402 | { | ||
403 | return 168; | ||
404 | } | ||
405 | static inline u32 ram_in_sc_use_ver2_pt_format_0_f(u32 v) | ||
406 | { | ||
407 | return (v & 0x1) << 10; | ||
408 | } | ||
409 | static inline u32 ram_in_sc_use_ver2_pt_format_0_w(void) | ||
410 | { | ||
411 | return 168; | ||
412 | } | ||
413 | static inline u32 ram_in_sc_big_page_size_0_f(u32 v) | ||
414 | { | ||
415 | return (v & 0x1) << 11; | ||
416 | } | ||
417 | static inline u32 ram_in_sc_big_page_size_0_w(void) | ||
418 | { | ||
419 | return 168; | ||
420 | } | ||
421 | static inline u32 ram_in_sc_page_dir_base_lo_0_f(u32 v) | ||
422 | { | ||
423 | return (v & 0xfffff) << 12; | ||
424 | } | ||
425 | static inline u32 ram_in_sc_page_dir_base_lo_0_w(void) | ||
426 | { | ||
427 | return 168; | ||
428 | } | ||
429 | static inline u32 ram_in_sc_page_dir_base_hi_0_f(u32 v) | ||
430 | { | ||
431 | return (v & 0xffffffff) << 0; | ||
432 | } | ||
433 | static inline u32 ram_in_sc_page_dir_base_hi_0_w(void) | ||
434 | { | ||
435 | return 169; | ||
436 | } | ||
437 | static inline u32 ram_in_base_shift_v(void) | ||
438 | { | ||
439 | return 0x0000000c; | ||
440 | } | ||
441 | static inline u32 ram_in_alloc_size_v(void) | ||
442 | { | ||
443 | return 0x00001000; | ||
444 | } | ||
445 | static inline u32 ram_fc_size_val_v(void) | ||
446 | { | ||
447 | return 0x00000200; | ||
448 | } | ||
449 | static inline u32 ram_fc_gp_put_w(void) | ||
450 | { | ||
451 | return 0; | ||
452 | } | ||
453 | static inline u32 ram_fc_userd_w(void) | ||
454 | { | ||
455 | return 2; | ||
456 | } | ||
457 | static inline u32 ram_fc_userd_hi_w(void) | ||
458 | { | ||
459 | return 3; | ||
460 | } | ||
461 | static inline u32 ram_fc_signature_w(void) | ||
462 | { | ||
463 | return 4; | ||
464 | } | ||
465 | static inline u32 ram_fc_gp_get_w(void) | ||
466 | { | ||
467 | return 5; | ||
468 | } | ||
469 | static inline u32 ram_fc_pb_get_w(void) | ||
470 | { | ||
471 | return 6; | ||
472 | } | ||
473 | static inline u32 ram_fc_pb_get_hi_w(void) | ||
474 | { | ||
475 | return 7; | ||
476 | } | ||
477 | static inline u32 ram_fc_pb_top_level_get_w(void) | ||
478 | { | ||
479 | return 8; | ||
480 | } | ||
481 | static inline u32 ram_fc_pb_top_level_get_hi_w(void) | ||
482 | { | ||
483 | return 9; | ||
484 | } | ||
485 | static inline u32 ram_fc_acquire_w(void) | ||
486 | { | ||
487 | return 12; | ||
488 | } | ||
489 | static inline u32 ram_fc_sem_addr_hi_w(void) | ||
490 | { | ||
491 | return 14; | ||
492 | } | ||
493 | static inline u32 ram_fc_sem_addr_lo_w(void) | ||
494 | { | ||
495 | return 15; | ||
496 | } | ||
497 | static inline u32 ram_fc_sem_payload_lo_w(void) | ||
498 | { | ||
499 | return 16; | ||
500 | } | ||
501 | static inline u32 ram_fc_sem_payload_hi_w(void) | ||
502 | { | ||
503 | return 39; | ||
504 | } | ||
505 | static inline u32 ram_fc_sem_execute_w(void) | ||
506 | { | ||
507 | return 17; | ||
508 | } | ||
509 | static inline u32 ram_fc_gp_base_w(void) | ||
510 | { | ||
511 | return 18; | ||
512 | } | ||
513 | static inline u32 ram_fc_gp_base_hi_w(void) | ||
514 | { | ||
515 | return 19; | ||
516 | } | ||
517 | static inline u32 ram_fc_gp_fetch_w(void) | ||
518 | { | ||
519 | return 20; | ||
520 | } | ||
521 | static inline u32 ram_fc_pb_fetch_w(void) | ||
522 | { | ||
523 | return 21; | ||
524 | } | ||
525 | static inline u32 ram_fc_pb_fetch_hi_w(void) | ||
526 | { | ||
527 | return 22; | ||
528 | } | ||
529 | static inline u32 ram_fc_pb_put_w(void) | ||
530 | { | ||
531 | return 23; | ||
532 | } | ||
533 | static inline u32 ram_fc_pb_put_hi_w(void) | ||
534 | { | ||
535 | return 24; | ||
536 | } | ||
537 | static inline u32 ram_fc_pb_header_w(void) | ||
538 | { | ||
539 | return 33; | ||
540 | } | ||
541 | static inline u32 ram_fc_pb_count_w(void) | ||
542 | { | ||
543 | return 34; | ||
544 | } | ||
545 | static inline u32 ram_fc_subdevice_w(void) | ||
546 | { | ||
547 | return 37; | ||
548 | } | ||
549 | static inline u32 ram_fc_allowed_syncpoints_w(void) | ||
550 | { | ||
551 | return 58; | ||
552 | } | ||
553 | static inline u32 ram_fc_target_w(void) | ||
554 | { | ||
555 | return 43; | ||
556 | } | ||
557 | static inline u32 ram_fc_hce_ctrl_w(void) | ||
558 | { | ||
559 | return 57; | ||
560 | } | ||
561 | static inline u32 ram_fc_chid_w(void) | ||
562 | { | ||
563 | return 58; | ||
564 | } | ||
565 | static inline u32 ram_fc_chid_id_f(u32 v) | ||
566 | { | ||
567 | return (v & 0xfff) << 0; | ||
568 | } | ||
569 | static inline u32 ram_fc_chid_id_w(void) | ||
570 | { | ||
571 | return 0; | ||
572 | } | ||
573 | static inline u32 ram_fc_config_w(void) | ||
574 | { | ||
575 | return 61; | ||
576 | } | ||
577 | static inline u32 ram_fc_runlist_timeslice_w(void) | ||
578 | { | ||
579 | return 62; | ||
580 | } | ||
581 | static inline u32 ram_fc_set_channel_info_w(void) | ||
582 | { | ||
583 | return 63; | ||
584 | } | ||
585 | static inline u32 ram_userd_base_shift_v(void) | ||
586 | { | ||
587 | return 0x00000009; | ||
588 | } | ||
589 | static inline u32 ram_userd_chan_size_v(void) | ||
590 | { | ||
591 | return 0x00000200; | ||
592 | } | ||
593 | static inline u32 ram_userd_put_w(void) | ||
594 | { | ||
595 | return 16; | ||
596 | } | ||
597 | static inline u32 ram_userd_get_w(void) | ||
598 | { | ||
599 | return 17; | ||
600 | } | ||
601 | static inline u32 ram_userd_ref_w(void) | ||
602 | { | ||
603 | return 18; | ||
604 | } | ||
605 | static inline u32 ram_userd_put_hi_w(void) | ||
606 | { | ||
607 | return 19; | ||
608 | } | ||
609 | static inline u32 ram_userd_ref_threshold_w(void) | ||
610 | { | ||
611 | return 20; | ||
612 | } | ||
613 | static inline u32 ram_userd_top_level_get_w(void) | ||
614 | { | ||
615 | return 22; | ||
616 | } | ||
617 | static inline u32 ram_userd_top_level_get_hi_w(void) | ||
618 | { | ||
619 | return 23; | ||
620 | } | ||
621 | static inline u32 ram_userd_get_hi_w(void) | ||
622 | { | ||
623 | return 24; | ||
624 | } | ||
625 | static inline u32 ram_userd_gp_get_w(void) | ||
626 | { | ||
627 | return 34; | ||
628 | } | ||
629 | static inline u32 ram_userd_gp_put_w(void) | ||
630 | { | ||
631 | return 35; | ||
632 | } | ||
633 | static inline u32 ram_userd_gp_top_level_get_w(void) | ||
634 | { | ||
635 | return 22; | ||
636 | } | ||
637 | static inline u32 ram_userd_gp_top_level_get_hi_w(void) | ||
638 | { | ||
639 | return 23; | ||
640 | } | ||
641 | static inline u32 ram_rl_entry_size_v(void) | ||
642 | { | ||
643 | return 0x00000010; | ||
644 | } | ||
645 | static inline u32 ram_rl_entry_type_f(u32 v) | ||
646 | { | ||
647 | return (v & 0x1) << 0; | ||
648 | } | ||
649 | static inline u32 ram_rl_entry_type_channel_v(void) | ||
650 | { | ||
651 | return 0x00000000; | ||
652 | } | ||
653 | static inline u32 ram_rl_entry_type_tsg_v(void) | ||
654 | { | ||
655 | return 0x00000001; | ||
656 | } | ||
657 | static inline u32 ram_rl_entry_id_f(u32 v) | ||
658 | { | ||
659 | return (v & 0xfff) << 0; | ||
660 | } | ||
661 | static inline u32 ram_rl_entry_chan_runqueue_selector_f(u32 v) | ||
662 | { | ||
663 | return (v & 0x1) << 1; | ||
664 | } | ||
665 | static inline u32 ram_rl_entry_chan_inst_target_f(u32 v) | ||
666 | { | ||
667 | return (v & 0x3) << 4; | ||
668 | } | ||
669 | static inline u32 ram_rl_entry_chan_inst_target_sys_mem_ncoh_v(void) | ||
670 | { | ||
671 | return 0x00000003; | ||
672 | } | ||
673 | static inline u32 ram_rl_entry_chan_userd_target_f(u32 v) | ||
674 | { | ||
675 | return (v & 0x3) << 6; | ||
676 | } | ||
677 | static inline u32 ram_rl_entry_chan_userd_target_vid_mem_v(void) | ||
678 | { | ||
679 | return 0x00000000; | ||
680 | } | ||
681 | static inline u32 ram_rl_entry_chan_userd_target_vid_mem_nvlink_coh_v(void) | ||
682 | { | ||
683 | return 0x00000001; | ||
684 | } | ||
685 | static inline u32 ram_rl_entry_chan_userd_target_sys_mem_coh_v(void) | ||
686 | { | ||
687 | return 0x00000002; | ||
688 | } | ||
689 | static inline u32 ram_rl_entry_chan_userd_target_sys_mem_ncoh_v(void) | ||
690 | { | ||
691 | return 0x00000003; | ||
692 | } | ||
693 | static inline u32 ram_rl_entry_chan_userd_ptr_lo_f(u32 v) | ||
694 | { | ||
695 | return (v & 0xffffff) << 8; | ||
696 | } | ||
697 | static inline u32 ram_rl_entry_chan_userd_ptr_hi_f(u32 v) | ||
698 | { | ||
699 | return (v & 0xffffffff) << 0; | ||
700 | } | ||
701 | static inline u32 ram_rl_entry_chid_f(u32 v) | ||
702 | { | ||
703 | return (v & 0xfff) << 0; | ||
704 | } | ||
705 | static inline u32 ram_rl_entry_chan_inst_ptr_lo_f(u32 v) | ||
706 | { | ||
707 | return (v & 0xfffff) << 12; | ||
708 | } | ||
709 | static inline u32 ram_rl_entry_chan_inst_ptr_hi_f(u32 v) | ||
710 | { | ||
711 | return (v & 0xffffffff) << 0; | ||
712 | } | ||
713 | static inline u32 ram_rl_entry_tsg_timeslice_scale_f(u32 v) | ||
714 | { | ||
715 | return (v & 0xf) << 16; | ||
716 | } | ||
717 | static inline u32 ram_rl_entry_tsg_timeslice_scale_3_v(void) | ||
718 | { | ||
719 | return 0x00000003; | ||
720 | } | ||
721 | static inline u32 ram_rl_entry_tsg_timeslice_timeout_f(u32 v) | ||
722 | { | ||
723 | return (v & 0xff) << 24; | ||
724 | } | ||
725 | static inline u32 ram_rl_entry_tsg_timeslice_timeout_128_v(void) | ||
726 | { | ||
727 | return 0x00000080; | ||
728 | } | ||
729 | static inline u32 ram_rl_entry_tsg_timeslice_timeout_disable_v(void) | ||
730 | { | ||
731 | return 0x00000000; | ||
732 | } | ||
733 | static inline u32 ram_rl_entry_tsg_length_f(u32 v) | ||
734 | { | ||
735 | return (v & 0xff) << 0; | ||
736 | } | ||
737 | static inline u32 ram_rl_entry_tsg_length_init_v(void) | ||
738 | { | ||
739 | return 0x00000000; | ||
740 | } | ||
741 | static inline u32 ram_rl_entry_tsg_length_min_v(void) | ||
742 | { | ||
743 | return 0x00000001; | ||
744 | } | ||
745 | static inline u32 ram_rl_entry_tsg_length_max_v(void) | ||
746 | { | ||
747 | return 0x00000080; | ||
748 | } | ||
749 | static inline u32 ram_rl_entry_tsg_tsgid_f(u32 v) | ||
750 | { | ||
751 | return (v & 0xfff) << 0; | ||
752 | } | ||
753 | static inline u32 ram_rl_entry_chan_userd_ptr_align_shift_v(void) | ||
754 | { | ||
755 | return 0x00000008; | ||
756 | } | ||
757 | static inline u32 ram_rl_entry_chan_userd_align_shift_v(void) | ||
758 | { | ||
759 | return 0x00000008; | ||
760 | } | ||
761 | static inline u32 ram_rl_entry_chan_inst_ptr_align_shift_v(void) | ||
762 | { | ||
763 | return 0x0000000c; | ||
764 | } | ||
765 | #endif | ||