diff options
Diffstat (limited to 'drivers/gpu/nvgpu/gv11b/hw_fb_gv11b.h')
-rw-r--r-- | drivers/gpu/nvgpu/gv11b/hw_fb_gv11b.h | 1485 |
1 files changed, 0 insertions, 1485 deletions
diff --git a/drivers/gpu/nvgpu/gv11b/hw_fb_gv11b.h b/drivers/gpu/nvgpu/gv11b/hw_fb_gv11b.h deleted file mode 100644 index d2f22afa..00000000 --- a/drivers/gpu/nvgpu/gv11b/hw_fb_gv11b.h +++ /dev/null | |||
@@ -1,1485 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (c) 2016, 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_fb_gv11b_h_ | ||
51 | #define _hw_fb_gv11b_h_ | ||
52 | |||
53 | static inline u32 fb_fbhub_num_active_ltcs_r(void) | ||
54 | { | ||
55 | return 0x00100800; | ||
56 | } | ||
57 | static inline u32 fb_mmu_ctrl_r(void) | ||
58 | { | ||
59 | return 0x00100c80; | ||
60 | } | ||
61 | static inline u32 fb_mmu_ctrl_vm_pg_size_f(u32 v) | ||
62 | { | ||
63 | return (v & 0x1) << 0; | ||
64 | } | ||
65 | static inline u32 fb_mmu_ctrl_vm_pg_size_128kb_f(void) | ||
66 | { | ||
67 | return 0x0; | ||
68 | } | ||
69 | static inline u32 fb_mmu_ctrl_vm_pg_size_64kb_f(void) | ||
70 | { | ||
71 | return 0x1; | ||
72 | } | ||
73 | static inline u32 fb_mmu_ctrl_pri_fifo_empty_v(u32 r) | ||
74 | { | ||
75 | return (r >> 15) & 0x1; | ||
76 | } | ||
77 | static inline u32 fb_mmu_ctrl_pri_fifo_empty_false_f(void) | ||
78 | { | ||
79 | return 0x0; | ||
80 | } | ||
81 | static inline u32 fb_mmu_ctrl_pri_fifo_space_v(u32 r) | ||
82 | { | ||
83 | return (r >> 16) & 0xff; | ||
84 | } | ||
85 | static inline u32 fb_mmu_ctrl_use_pdb_big_page_size_v(u32 r) | ||
86 | { | ||
87 | return (r >> 11) & 0x1; | ||
88 | } | ||
89 | static inline u32 fb_mmu_ctrl_use_pdb_big_page_size_true_f(void) | ||
90 | { | ||
91 | return 0x800; | ||
92 | } | ||
93 | static inline u32 fb_mmu_ctrl_use_pdb_big_page_size_false_f(void) | ||
94 | { | ||
95 | return 0x0; | ||
96 | } | ||
97 | static inline u32 fb_priv_mmu_phy_secure_r(void) | ||
98 | { | ||
99 | return 0x00100ce4; | ||
100 | } | ||
101 | static inline u32 fb_mmu_invalidate_pdb_r(void) | ||
102 | { | ||
103 | return 0x00100cb8; | ||
104 | } | ||
105 | static inline u32 fb_mmu_invalidate_pdb_aperture_vid_mem_f(void) | ||
106 | { | ||
107 | return 0x0; | ||
108 | } | ||
109 | static inline u32 fb_mmu_invalidate_pdb_aperture_sys_mem_f(void) | ||
110 | { | ||
111 | return 0x2; | ||
112 | } | ||
113 | static inline u32 fb_mmu_invalidate_pdb_addr_f(u32 v) | ||
114 | { | ||
115 | return (v & 0xfffffff) << 4; | ||
116 | } | ||
117 | static inline u32 fb_mmu_invalidate_r(void) | ||
118 | { | ||
119 | return 0x00100cbc; | ||
120 | } | ||
121 | static inline u32 fb_mmu_invalidate_all_va_true_f(void) | ||
122 | { | ||
123 | return 0x1; | ||
124 | } | ||
125 | static inline u32 fb_mmu_invalidate_all_pdb_true_f(void) | ||
126 | { | ||
127 | return 0x2; | ||
128 | } | ||
129 | static inline u32 fb_mmu_invalidate_hubtlb_only_s(void) | ||
130 | { | ||
131 | return 1; | ||
132 | } | ||
133 | static inline u32 fb_mmu_invalidate_hubtlb_only_f(u32 v) | ||
134 | { | ||
135 | return (v & 0x1) << 2; | ||
136 | } | ||
137 | static inline u32 fb_mmu_invalidate_hubtlb_only_m(void) | ||
138 | { | ||
139 | return 0x1 << 2; | ||
140 | } | ||
141 | static inline u32 fb_mmu_invalidate_hubtlb_only_v(u32 r) | ||
142 | { | ||
143 | return (r >> 2) & 0x1; | ||
144 | } | ||
145 | static inline u32 fb_mmu_invalidate_hubtlb_only_true_f(void) | ||
146 | { | ||
147 | return 0x4; | ||
148 | } | ||
149 | static inline u32 fb_mmu_invalidate_replay_s(void) | ||
150 | { | ||
151 | return 3; | ||
152 | } | ||
153 | static inline u32 fb_mmu_invalidate_replay_f(u32 v) | ||
154 | { | ||
155 | return (v & 0x7) << 3; | ||
156 | } | ||
157 | static inline u32 fb_mmu_invalidate_replay_m(void) | ||
158 | { | ||
159 | return 0x7 << 3; | ||
160 | } | ||
161 | static inline u32 fb_mmu_invalidate_replay_v(u32 r) | ||
162 | { | ||
163 | return (r >> 3) & 0x7; | ||
164 | } | ||
165 | static inline u32 fb_mmu_invalidate_replay_none_f(void) | ||
166 | { | ||
167 | return 0x0; | ||
168 | } | ||
169 | static inline u32 fb_mmu_invalidate_replay_start_f(void) | ||
170 | { | ||
171 | return 0x8; | ||
172 | } | ||
173 | static inline u32 fb_mmu_invalidate_replay_start_ack_all_f(void) | ||
174 | { | ||
175 | return 0x10; | ||
176 | } | ||
177 | static inline u32 fb_mmu_invalidate_sys_membar_s(void) | ||
178 | { | ||
179 | return 1; | ||
180 | } | ||
181 | static inline u32 fb_mmu_invalidate_sys_membar_f(u32 v) | ||
182 | { | ||
183 | return (v & 0x1) << 6; | ||
184 | } | ||
185 | static inline u32 fb_mmu_invalidate_sys_membar_m(void) | ||
186 | { | ||
187 | return 0x1 << 6; | ||
188 | } | ||
189 | static inline u32 fb_mmu_invalidate_sys_membar_v(u32 r) | ||
190 | { | ||
191 | return (r >> 6) & 0x1; | ||
192 | } | ||
193 | static inline u32 fb_mmu_invalidate_sys_membar_true_f(void) | ||
194 | { | ||
195 | return 0x40; | ||
196 | } | ||
197 | static inline u32 fb_mmu_invalidate_ack_s(void) | ||
198 | { | ||
199 | return 2; | ||
200 | } | ||
201 | static inline u32 fb_mmu_invalidate_ack_f(u32 v) | ||
202 | { | ||
203 | return (v & 0x3) << 7; | ||
204 | } | ||
205 | static inline u32 fb_mmu_invalidate_ack_m(void) | ||
206 | { | ||
207 | return 0x3 << 7; | ||
208 | } | ||
209 | static inline u32 fb_mmu_invalidate_ack_v(u32 r) | ||
210 | { | ||
211 | return (r >> 7) & 0x3; | ||
212 | } | ||
213 | static inline u32 fb_mmu_invalidate_ack_ack_none_required_f(void) | ||
214 | { | ||
215 | return 0x0; | ||
216 | } | ||
217 | static inline u32 fb_mmu_invalidate_ack_ack_intranode_f(void) | ||
218 | { | ||
219 | return 0x100; | ||
220 | } | ||
221 | static inline u32 fb_mmu_invalidate_ack_ack_globally_f(void) | ||
222 | { | ||
223 | return 0x80; | ||
224 | } | ||
225 | static inline u32 fb_mmu_invalidate_cancel_client_id_s(void) | ||
226 | { | ||
227 | return 6; | ||
228 | } | ||
229 | static inline u32 fb_mmu_invalidate_cancel_client_id_f(u32 v) | ||
230 | { | ||
231 | return (v & 0x3f) << 9; | ||
232 | } | ||
233 | static inline u32 fb_mmu_invalidate_cancel_client_id_m(void) | ||
234 | { | ||
235 | return 0x3f << 9; | ||
236 | } | ||
237 | static inline u32 fb_mmu_invalidate_cancel_client_id_v(u32 r) | ||
238 | { | ||
239 | return (r >> 9) & 0x3f; | ||
240 | } | ||
241 | static inline u32 fb_mmu_invalidate_cancel_gpc_id_s(void) | ||
242 | { | ||
243 | return 5; | ||
244 | } | ||
245 | static inline u32 fb_mmu_invalidate_cancel_gpc_id_f(u32 v) | ||
246 | { | ||
247 | return (v & 0x1f) << 15; | ||
248 | } | ||
249 | static inline u32 fb_mmu_invalidate_cancel_gpc_id_m(void) | ||
250 | { | ||
251 | return 0x1f << 15; | ||
252 | } | ||
253 | static inline u32 fb_mmu_invalidate_cancel_gpc_id_v(u32 r) | ||
254 | { | ||
255 | return (r >> 15) & 0x1f; | ||
256 | } | ||
257 | static inline u32 fb_mmu_invalidate_cancel_client_type_s(void) | ||
258 | { | ||
259 | return 1; | ||
260 | } | ||
261 | static inline u32 fb_mmu_invalidate_cancel_client_type_f(u32 v) | ||
262 | { | ||
263 | return (v & 0x1) << 20; | ||
264 | } | ||
265 | static inline u32 fb_mmu_invalidate_cancel_client_type_m(void) | ||
266 | { | ||
267 | return 0x1 << 20; | ||
268 | } | ||
269 | static inline u32 fb_mmu_invalidate_cancel_client_type_v(u32 r) | ||
270 | { | ||
271 | return (r >> 20) & 0x1; | ||
272 | } | ||
273 | static inline u32 fb_mmu_invalidate_cancel_client_type_gpc_f(void) | ||
274 | { | ||
275 | return 0x0; | ||
276 | } | ||
277 | static inline u32 fb_mmu_invalidate_cancel_client_type_hub_f(void) | ||
278 | { | ||
279 | return 0x100000; | ||
280 | } | ||
281 | static inline u32 fb_mmu_invalidate_cancel_cache_level_s(void) | ||
282 | { | ||
283 | return 3; | ||
284 | } | ||
285 | static inline u32 fb_mmu_invalidate_cancel_cache_level_f(u32 v) | ||
286 | { | ||
287 | return (v & 0x7) << 24; | ||
288 | } | ||
289 | static inline u32 fb_mmu_invalidate_cancel_cache_level_m(void) | ||
290 | { | ||
291 | return 0x7 << 24; | ||
292 | } | ||
293 | static inline u32 fb_mmu_invalidate_cancel_cache_level_v(u32 r) | ||
294 | { | ||
295 | return (r >> 24) & 0x7; | ||
296 | } | ||
297 | static inline u32 fb_mmu_invalidate_cancel_cache_level_all_f(void) | ||
298 | { | ||
299 | return 0x0; | ||
300 | } | ||
301 | static inline u32 fb_mmu_invalidate_cancel_cache_level_pte_only_f(void) | ||
302 | { | ||
303 | return 0x1000000; | ||
304 | } | ||
305 | static inline u32 fb_mmu_invalidate_cancel_cache_level_up_to_pde0_f(void) | ||
306 | { | ||
307 | return 0x2000000; | ||
308 | } | ||
309 | static inline u32 fb_mmu_invalidate_cancel_cache_level_up_to_pde1_f(void) | ||
310 | { | ||
311 | return 0x3000000; | ||
312 | } | ||
313 | static inline u32 fb_mmu_invalidate_cancel_cache_level_up_to_pde2_f(void) | ||
314 | { | ||
315 | return 0x4000000; | ||
316 | } | ||
317 | static inline u32 fb_mmu_invalidate_cancel_cache_level_up_to_pde3_f(void) | ||
318 | { | ||
319 | return 0x5000000; | ||
320 | } | ||
321 | static inline u32 fb_mmu_invalidate_cancel_cache_level_up_to_pde4_f(void) | ||
322 | { | ||
323 | return 0x6000000; | ||
324 | } | ||
325 | static inline u32 fb_mmu_invalidate_cancel_cache_level_up_to_pde5_f(void) | ||
326 | { | ||
327 | return 0x7000000; | ||
328 | } | ||
329 | static inline u32 fb_mmu_invalidate_trigger_s(void) | ||
330 | { | ||
331 | return 1; | ||
332 | } | ||
333 | static inline u32 fb_mmu_invalidate_trigger_f(u32 v) | ||
334 | { | ||
335 | return (v & 0x1) << 31; | ||
336 | } | ||
337 | static inline u32 fb_mmu_invalidate_trigger_m(void) | ||
338 | { | ||
339 | return 0x1 << 31; | ||
340 | } | ||
341 | static inline u32 fb_mmu_invalidate_trigger_v(u32 r) | ||
342 | { | ||
343 | return (r >> 31) & 0x1; | ||
344 | } | ||
345 | static inline u32 fb_mmu_invalidate_trigger_true_f(void) | ||
346 | { | ||
347 | return 0x80000000; | ||
348 | } | ||
349 | static inline u32 fb_mmu_debug_wr_r(void) | ||
350 | { | ||
351 | return 0x00100cc8; | ||
352 | } | ||
353 | static inline u32 fb_mmu_debug_wr_aperture_s(void) | ||
354 | { | ||
355 | return 2; | ||
356 | } | ||
357 | static inline u32 fb_mmu_debug_wr_aperture_f(u32 v) | ||
358 | { | ||
359 | return (v & 0x3) << 0; | ||
360 | } | ||
361 | static inline u32 fb_mmu_debug_wr_aperture_m(void) | ||
362 | { | ||
363 | return 0x3 << 0; | ||
364 | } | ||
365 | static inline u32 fb_mmu_debug_wr_aperture_v(u32 r) | ||
366 | { | ||
367 | return (r >> 0) & 0x3; | ||
368 | } | ||
369 | static inline u32 fb_mmu_debug_wr_aperture_vid_mem_f(void) | ||
370 | { | ||
371 | return 0x0; | ||
372 | } | ||
373 | static inline u32 fb_mmu_debug_wr_aperture_sys_mem_coh_f(void) | ||
374 | { | ||
375 | return 0x2; | ||
376 | } | ||
377 | static inline u32 fb_mmu_debug_wr_aperture_sys_mem_ncoh_f(void) | ||
378 | { | ||
379 | return 0x3; | ||
380 | } | ||
381 | static inline u32 fb_mmu_debug_wr_vol_false_f(void) | ||
382 | { | ||
383 | return 0x0; | ||
384 | } | ||
385 | static inline u32 fb_mmu_debug_wr_vol_true_v(void) | ||
386 | { | ||
387 | return 0x00000001; | ||
388 | } | ||
389 | static inline u32 fb_mmu_debug_wr_vol_true_f(void) | ||
390 | { | ||
391 | return 0x4; | ||
392 | } | ||
393 | static inline u32 fb_mmu_debug_wr_addr_f(u32 v) | ||
394 | { | ||
395 | return (v & 0xfffffff) << 4; | ||
396 | } | ||
397 | static inline u32 fb_mmu_debug_wr_addr_alignment_v(void) | ||
398 | { | ||
399 | return 0x0000000c; | ||
400 | } | ||
401 | static inline u32 fb_mmu_debug_rd_r(void) | ||
402 | { | ||
403 | return 0x00100ccc; | ||
404 | } | ||
405 | static inline u32 fb_mmu_debug_rd_aperture_vid_mem_f(void) | ||
406 | { | ||
407 | return 0x0; | ||
408 | } | ||
409 | static inline u32 fb_mmu_debug_rd_aperture_sys_mem_coh_f(void) | ||
410 | { | ||
411 | return 0x2; | ||
412 | } | ||
413 | static inline u32 fb_mmu_debug_rd_aperture_sys_mem_ncoh_f(void) | ||
414 | { | ||
415 | return 0x3; | ||
416 | } | ||
417 | static inline u32 fb_mmu_debug_rd_vol_false_f(void) | ||
418 | { | ||
419 | return 0x0; | ||
420 | } | ||
421 | static inline u32 fb_mmu_debug_rd_addr_f(u32 v) | ||
422 | { | ||
423 | return (v & 0xfffffff) << 4; | ||
424 | } | ||
425 | static inline u32 fb_mmu_debug_rd_addr_alignment_v(void) | ||
426 | { | ||
427 | return 0x0000000c; | ||
428 | } | ||
429 | static inline u32 fb_mmu_debug_ctrl_r(void) | ||
430 | { | ||
431 | return 0x00100cc4; | ||
432 | } | ||
433 | static inline u32 fb_mmu_debug_ctrl_debug_v(u32 r) | ||
434 | { | ||
435 | return (r >> 16) & 0x1; | ||
436 | } | ||
437 | static inline u32 fb_mmu_debug_ctrl_debug_m(void) | ||
438 | { | ||
439 | return 0x1 << 16; | ||
440 | } | ||
441 | static inline u32 fb_mmu_debug_ctrl_debug_enabled_v(void) | ||
442 | { | ||
443 | return 0x00000001; | ||
444 | } | ||
445 | static inline u32 fb_mmu_debug_ctrl_debug_disabled_v(void) | ||
446 | { | ||
447 | return 0x00000000; | ||
448 | } | ||
449 | static inline u32 fb_mmu_vpr_info_r(void) | ||
450 | { | ||
451 | return 0x00100cd0; | ||
452 | } | ||
453 | static inline u32 fb_mmu_vpr_info_fetch_v(u32 r) | ||
454 | { | ||
455 | return (r >> 2) & 0x1; | ||
456 | } | ||
457 | static inline u32 fb_mmu_vpr_info_fetch_false_v(void) | ||
458 | { | ||
459 | return 0x00000000; | ||
460 | } | ||
461 | static inline u32 fb_mmu_vpr_info_fetch_true_v(void) | ||
462 | { | ||
463 | return 0x00000001; | ||
464 | } | ||
465 | static inline u32 fb_niso_flush_sysmem_addr_r(void) | ||
466 | { | ||
467 | return 0x00100c10; | ||
468 | } | ||
469 | static inline u32 fb_niso_intr_r(void) | ||
470 | { | ||
471 | return 0x00100a20; | ||
472 | } | ||
473 | static inline u32 fb_niso_intr_hub_access_counter_notify_f(u32 v) | ||
474 | { | ||
475 | return (v & 0x1) << 0; | ||
476 | } | ||
477 | static inline u32 fb_niso_intr_hub_access_counter_notify_pending_f(void) | ||
478 | { | ||
479 | return 0x1; | ||
480 | } | ||
481 | static inline u32 fb_niso_intr_hub_access_counter_error_f(u32 v) | ||
482 | { | ||
483 | return (v & 0x1) << 1; | ||
484 | } | ||
485 | static inline u32 fb_niso_intr_hub_access_counter_error_pending_f(void) | ||
486 | { | ||
487 | return 0x2; | ||
488 | } | ||
489 | static inline u32 fb_niso_intr_mmu_replayable_fault_notify_f(u32 v) | ||
490 | { | ||
491 | return (v & 0x1) << 27; | ||
492 | } | ||
493 | static inline u32 fb_niso_intr_mmu_replayable_fault_notify_pending_f(void) | ||
494 | { | ||
495 | return 0x8000000; | ||
496 | } | ||
497 | static inline u32 fb_niso_intr_mmu_replayable_fault_overflow_f(u32 v) | ||
498 | { | ||
499 | return (v & 0x1) << 28; | ||
500 | } | ||
501 | static inline u32 fb_niso_intr_mmu_replayable_fault_overflow_pending_f(void) | ||
502 | { | ||
503 | return 0x10000000; | ||
504 | } | ||
505 | static inline u32 fb_niso_intr_mmu_nonreplayable_fault_notify_f(u32 v) | ||
506 | { | ||
507 | return (v & 0x1) << 29; | ||
508 | } | ||
509 | static inline u32 fb_niso_intr_mmu_nonreplayable_fault_notify_pending_f(void) | ||
510 | { | ||
511 | return 0x20000000; | ||
512 | } | ||
513 | static inline u32 fb_niso_intr_mmu_nonreplayable_fault_overflow_f(u32 v) | ||
514 | { | ||
515 | return (v & 0x1) << 30; | ||
516 | } | ||
517 | static inline u32 fb_niso_intr_mmu_nonreplayable_fault_overflow_pending_f(void) | ||
518 | { | ||
519 | return 0x40000000; | ||
520 | } | ||
521 | static inline u32 fb_niso_intr_mmu_other_fault_notify_f(u32 v) | ||
522 | { | ||
523 | return (v & 0x1) << 31; | ||
524 | } | ||
525 | static inline u32 fb_niso_intr_mmu_other_fault_notify_pending_f(void) | ||
526 | { | ||
527 | return 0x80000000; | ||
528 | } | ||
529 | static inline u32 fb_niso_intr_en_r(u32 i) | ||
530 | { | ||
531 | return 0x00100a24 + i*4; | ||
532 | } | ||
533 | static inline u32 fb_niso_intr_en__size_1_v(void) | ||
534 | { | ||
535 | return 0x00000002; | ||
536 | } | ||
537 | static inline u32 fb_niso_intr_en_hub_access_counter_notify_f(u32 v) | ||
538 | { | ||
539 | return (v & 0x1) << 0; | ||
540 | } | ||
541 | static inline u32 fb_niso_intr_en_hub_access_counter_notify_enabled_f(void) | ||
542 | { | ||
543 | return 0x1; | ||
544 | } | ||
545 | static inline u32 fb_niso_intr_en_hub_access_counter_error_f(u32 v) | ||
546 | { | ||
547 | return (v & 0x1) << 1; | ||
548 | } | ||
549 | static inline u32 fb_niso_intr_en_hub_access_counter_error_enabled_f(void) | ||
550 | { | ||
551 | return 0x2; | ||
552 | } | ||
553 | static inline u32 fb_niso_intr_en_mmu_replayable_fault_notify_f(u32 v) | ||
554 | { | ||
555 | return (v & 0x1) << 27; | ||
556 | } | ||
557 | static inline u32 fb_niso_intr_en_mmu_replayable_fault_notify_enabled_f(void) | ||
558 | { | ||
559 | return 0x8000000; | ||
560 | } | ||
561 | static inline u32 fb_niso_intr_en_mmu_replayable_fault_overflow_f(u32 v) | ||
562 | { | ||
563 | return (v & 0x1) << 28; | ||
564 | } | ||
565 | static inline u32 fb_niso_intr_en_mmu_replayable_fault_overflow_enabled_f(void) | ||
566 | { | ||
567 | return 0x10000000; | ||
568 | } | ||
569 | static inline u32 fb_niso_intr_en_mmu_nonreplayable_fault_notify_f(u32 v) | ||
570 | { | ||
571 | return (v & 0x1) << 29; | ||
572 | } | ||
573 | static inline u32 fb_niso_intr_en_mmu_nonreplayable_fault_notify_enabled_f(void) | ||
574 | { | ||
575 | return 0x20000000; | ||
576 | } | ||
577 | static inline u32 fb_niso_intr_en_mmu_nonreplayable_fault_overflow_f(u32 v) | ||
578 | { | ||
579 | return (v & 0x1) << 30; | ||
580 | } | ||
581 | static inline u32 fb_niso_intr_en_mmu_nonreplayable_fault_overflow_enabled_f(void) | ||
582 | { | ||
583 | return 0x40000000; | ||
584 | } | ||
585 | static inline u32 fb_niso_intr_en_mmu_other_fault_notify_f(u32 v) | ||
586 | { | ||
587 | return (v & 0x1) << 31; | ||
588 | } | ||
589 | static inline u32 fb_niso_intr_en_mmu_other_fault_notify_enabled_f(void) | ||
590 | { | ||
591 | return 0x80000000; | ||
592 | } | ||
593 | static inline u32 fb_niso_intr_en_set_r(u32 i) | ||
594 | { | ||
595 | return 0x00100a2c + i*4; | ||
596 | } | ||
597 | static inline u32 fb_niso_intr_en_set__size_1_v(void) | ||
598 | { | ||
599 | return 0x00000002; | ||
600 | } | ||
601 | static inline u32 fb_niso_intr_en_set_hub_access_counter_notify_f(u32 v) | ||
602 | { | ||
603 | return (v & 0x1) << 0; | ||
604 | } | ||
605 | static inline u32 fb_niso_intr_en_set_hub_access_counter_notify_set_f(void) | ||
606 | { | ||
607 | return 0x1; | ||
608 | } | ||
609 | static inline u32 fb_niso_intr_en_set_hub_access_counter_error_f(u32 v) | ||
610 | { | ||
611 | return (v & 0x1) << 1; | ||
612 | } | ||
613 | static inline u32 fb_niso_intr_en_set_hub_access_counter_error_set_f(void) | ||
614 | { | ||
615 | return 0x2; | ||
616 | } | ||
617 | static inline u32 fb_niso_intr_en_set_mmu_replayable_fault_notify_f(u32 v) | ||
618 | { | ||
619 | return (v & 0x1) << 27; | ||
620 | } | ||
621 | static inline u32 fb_niso_intr_en_set_mmu_replayable_fault_notify_set_f(void) | ||
622 | { | ||
623 | return 0x8000000; | ||
624 | } | ||
625 | static inline u32 fb_niso_intr_en_set_mmu_replayable_fault_overflow_f(u32 v) | ||
626 | { | ||
627 | return (v & 0x1) << 28; | ||
628 | } | ||
629 | static inline u32 fb_niso_intr_en_set_mmu_replayable_fault_overflow_set_f(void) | ||
630 | { | ||
631 | return 0x10000000; | ||
632 | } | ||
633 | static inline u32 fb_niso_intr_en_set_mmu_nonreplayable_fault_notify_f(u32 v) | ||
634 | { | ||
635 | return (v & 0x1) << 29; | ||
636 | } | ||
637 | static inline u32 fb_niso_intr_en_set_mmu_nonreplayable_fault_notify_set_f(void) | ||
638 | { | ||
639 | return 0x20000000; | ||
640 | } | ||
641 | static inline u32 fb_niso_intr_en_set_mmu_nonreplayable_fault_overflow_f(u32 v) | ||
642 | { | ||
643 | return (v & 0x1) << 30; | ||
644 | } | ||
645 | static inline u32 fb_niso_intr_en_set_mmu_nonreplayable_fault_overflow_set_f(void) | ||
646 | { | ||
647 | return 0x40000000; | ||
648 | } | ||
649 | static inline u32 fb_niso_intr_en_set_mmu_other_fault_notify_f(u32 v) | ||
650 | { | ||
651 | return (v & 0x1) << 31; | ||
652 | } | ||
653 | static inline u32 fb_niso_intr_en_set_mmu_other_fault_notify_set_f(void) | ||
654 | { | ||
655 | return 0x80000000; | ||
656 | } | ||
657 | static inline u32 fb_niso_intr_en_clr_r(u32 i) | ||
658 | { | ||
659 | return 0x00100a34 + i*4; | ||
660 | } | ||
661 | static inline u32 fb_niso_intr_en_clr__size_1_v(void) | ||
662 | { | ||
663 | return 0x00000002; | ||
664 | } | ||
665 | static inline u32 fb_niso_intr_en_clr_hub_access_counter_notify_f(u32 v) | ||
666 | { | ||
667 | return (v & 0x1) << 0; | ||
668 | } | ||
669 | static inline u32 fb_niso_intr_en_clr_hub_access_counter_notify_set_f(void) | ||
670 | { | ||
671 | return 0x1; | ||
672 | } | ||
673 | static inline u32 fb_niso_intr_en_clr_hub_access_counter_error_f(u32 v) | ||
674 | { | ||
675 | return (v & 0x1) << 1; | ||
676 | } | ||
677 | static inline u32 fb_niso_intr_en_clr_hub_access_counter_error_set_f(void) | ||
678 | { | ||
679 | return 0x2; | ||
680 | } | ||
681 | static inline u32 fb_niso_intr_en_clr_mmu_replayable_fault_notify_f(u32 v) | ||
682 | { | ||
683 | return (v & 0x1) << 27; | ||
684 | } | ||
685 | static inline u32 fb_niso_intr_en_clr_mmu_replayable_fault_notify_set_f(void) | ||
686 | { | ||
687 | return 0x8000000; | ||
688 | } | ||
689 | static inline u32 fb_niso_intr_en_clr_mmu_replayable_fault_overflow_f(u32 v) | ||
690 | { | ||
691 | return (v & 0x1) << 28; | ||
692 | } | ||
693 | static inline u32 fb_niso_intr_en_clr_mmu_replayable_fault_overflow_set_f(void) | ||
694 | { | ||
695 | return 0x10000000; | ||
696 | } | ||
697 | static inline u32 fb_niso_intr_en_clr_mmu_nonreplayable_fault_notify_f(u32 v) | ||
698 | { | ||
699 | return (v & 0x1) << 29; | ||
700 | } | ||
701 | static inline u32 fb_niso_intr_en_clr_mmu_nonreplayable_fault_notify_set_f(void) | ||
702 | { | ||
703 | return 0x20000000; | ||
704 | } | ||
705 | static inline u32 fb_niso_intr_en_clr_mmu_nonreplayable_fault_overflow_f(u32 v) | ||
706 | { | ||
707 | return (v & 0x1) << 30; | ||
708 | } | ||
709 | static inline u32 fb_niso_intr_en_clr_mmu_nonreplayable_fault_overflow_set_f(void) | ||
710 | { | ||
711 | return 0x40000000; | ||
712 | } | ||
713 | static inline u32 fb_niso_intr_en_clr_mmu_other_fault_notify_f(u32 v) | ||
714 | { | ||
715 | return (v & 0x1) << 31; | ||
716 | } | ||
717 | static inline u32 fb_niso_intr_en_clr_mmu_other_fault_notify_set_f(void) | ||
718 | { | ||
719 | return 0x80000000; | ||
720 | } | ||
721 | static inline u32 fb_niso_intr_en_clr_mmu_non_replay_fault_buffer_v(void) | ||
722 | { | ||
723 | return 0x00000000; | ||
724 | } | ||
725 | static inline u32 fb_niso_intr_en_clr_mmu_replay_fault_buffer_v(void) | ||
726 | { | ||
727 | return 0x00000001; | ||
728 | } | ||
729 | static inline u32 fb_mmu_fault_buffer_lo_r(u32 i) | ||
730 | { | ||
731 | return 0x00100e24 + i*20; | ||
732 | } | ||
733 | static inline u32 fb_mmu_fault_buffer_lo__size_1_v(void) | ||
734 | { | ||
735 | return 0x00000002; | ||
736 | } | ||
737 | static inline u32 fb_mmu_fault_buffer_lo_addr_mode_f(u32 v) | ||
738 | { | ||
739 | return (v & 0x1) << 0; | ||
740 | } | ||
741 | static inline u32 fb_mmu_fault_buffer_lo_addr_mode_v(u32 r) | ||
742 | { | ||
743 | return (r >> 0) & 0x1; | ||
744 | } | ||
745 | static inline u32 fb_mmu_fault_buffer_lo_addr_mode_virtual_v(void) | ||
746 | { | ||
747 | return 0x00000000; | ||
748 | } | ||
749 | static inline u32 fb_mmu_fault_buffer_lo_addr_mode_virtual_f(void) | ||
750 | { | ||
751 | return 0x0; | ||
752 | } | ||
753 | static inline u32 fb_mmu_fault_buffer_lo_addr_mode_physical_v(void) | ||
754 | { | ||
755 | return 0x00000001; | ||
756 | } | ||
757 | static inline u32 fb_mmu_fault_buffer_lo_addr_mode_physical_f(void) | ||
758 | { | ||
759 | return 0x1; | ||
760 | } | ||
761 | static inline u32 fb_mmu_fault_buffer_lo_phys_aperture_f(u32 v) | ||
762 | { | ||
763 | return (v & 0x3) << 1; | ||
764 | } | ||
765 | static inline u32 fb_mmu_fault_buffer_lo_phys_aperture_v(u32 r) | ||
766 | { | ||
767 | return (r >> 1) & 0x3; | ||
768 | } | ||
769 | static inline u32 fb_mmu_fault_buffer_lo_phys_aperture_sys_coh_v(void) | ||
770 | { | ||
771 | return 0x00000002; | ||
772 | } | ||
773 | static inline u32 fb_mmu_fault_buffer_lo_phys_aperture_sys_coh_f(void) | ||
774 | { | ||
775 | return 0x4; | ||
776 | } | ||
777 | static inline u32 fb_mmu_fault_buffer_lo_phys_aperture_sys_nocoh_v(void) | ||
778 | { | ||
779 | return 0x00000003; | ||
780 | } | ||
781 | static inline u32 fb_mmu_fault_buffer_lo_phys_aperture_sys_nocoh_f(void) | ||
782 | { | ||
783 | return 0x6; | ||
784 | } | ||
785 | static inline u32 fb_mmu_fault_buffer_lo_phys_vol_f(u32 v) | ||
786 | { | ||
787 | return (v & 0x1) << 3; | ||
788 | } | ||
789 | static inline u32 fb_mmu_fault_buffer_lo_phys_vol_v(u32 r) | ||
790 | { | ||
791 | return (r >> 3) & 0x1; | ||
792 | } | ||
793 | static inline u32 fb_mmu_fault_buffer_lo_addr_f(u32 v) | ||
794 | { | ||
795 | return (v & 0xfffff) << 12; | ||
796 | } | ||
797 | static inline u32 fb_mmu_fault_buffer_lo_addr_v(u32 r) | ||
798 | { | ||
799 | return (r >> 12) & 0xfffff; | ||
800 | } | ||
801 | static inline u32 fb_mmu_fault_buffer_hi_r(u32 i) | ||
802 | { | ||
803 | return 0x00100e28 + i*20; | ||
804 | } | ||
805 | static inline u32 fb_mmu_fault_buffer_hi__size_1_v(void) | ||
806 | { | ||
807 | return 0x00000002; | ||
808 | } | ||
809 | static inline u32 fb_mmu_fault_buffer_hi_addr_f(u32 v) | ||
810 | { | ||
811 | return (v & 0xffffffff) << 0; | ||
812 | } | ||
813 | static inline u32 fb_mmu_fault_buffer_hi_addr_v(u32 r) | ||
814 | { | ||
815 | return (r >> 0) & 0xffffffff; | ||
816 | } | ||
817 | static inline u32 fb_mmu_fault_buffer_get_r(u32 i) | ||
818 | { | ||
819 | return 0x00100e2c + i*20; | ||
820 | } | ||
821 | static inline u32 fb_mmu_fault_buffer_get__size_1_v(void) | ||
822 | { | ||
823 | return 0x00000002; | ||
824 | } | ||
825 | static inline u32 fb_mmu_fault_buffer_get_ptr_f(u32 v) | ||
826 | { | ||
827 | return (v & 0xfffff) << 0; | ||
828 | } | ||
829 | static inline u32 fb_mmu_fault_buffer_get_ptr_v(u32 r) | ||
830 | { | ||
831 | return (r >> 0) & 0xfffff; | ||
832 | } | ||
833 | static inline u32 fb_mmu_fault_buffer_get_getptr_corrupted_f(u32 v) | ||
834 | { | ||
835 | return (v & 0x1) << 30; | ||
836 | } | ||
837 | static inline u32 fb_mmu_fault_buffer_get_getptr_corrupted_v(u32 r) | ||
838 | { | ||
839 | return (r >> 30) & 0x1; | ||
840 | } | ||
841 | static inline u32 fb_mmu_fault_buffer_get_getptr_corrupted_yes_v(void) | ||
842 | { | ||
843 | return 0x00000001; | ||
844 | } | ||
845 | static inline u32 fb_mmu_fault_buffer_get_getptr_corrupted_clear_v(void) | ||
846 | { | ||
847 | return 0x00000001; | ||
848 | } | ||
849 | static inline u32 fb_mmu_fault_buffer_get_getptr_corrupted_clear_f(void) | ||
850 | { | ||
851 | return 0x40000000; | ||
852 | } | ||
853 | static inline u32 fb_mmu_fault_buffer_get_overflow_f(u32 v) | ||
854 | { | ||
855 | return (v & 0x1) << 31; | ||
856 | } | ||
857 | static inline u32 fb_mmu_fault_buffer_get_overflow_v(u32 r) | ||
858 | { | ||
859 | return (r >> 31) & 0x1; | ||
860 | } | ||
861 | static inline u32 fb_mmu_fault_buffer_get_overflow_yes_v(void) | ||
862 | { | ||
863 | return 0x00000001; | ||
864 | } | ||
865 | static inline u32 fb_mmu_fault_buffer_get_overflow_yes_f(void) | ||
866 | { | ||
867 | return 0x80000000; | ||
868 | } | ||
869 | static inline u32 fb_mmu_fault_buffer_get_overflow_clear_v(void) | ||
870 | { | ||
871 | return 0x00000001; | ||
872 | } | ||
873 | static inline u32 fb_mmu_fault_buffer_get_overflow_clear_f(void) | ||
874 | { | ||
875 | return 0x80000000; | ||
876 | } | ||
877 | static inline u32 fb_mmu_fault_buffer_put_r(u32 i) | ||
878 | { | ||
879 | return 0x00100e30 + i*20; | ||
880 | } | ||
881 | static inline u32 fb_mmu_fault_buffer_put__size_1_v(void) | ||
882 | { | ||
883 | return 0x00000002; | ||
884 | } | ||
885 | static inline u32 fb_mmu_fault_buffer_put_ptr_f(u32 v) | ||
886 | { | ||
887 | return (v & 0xfffff) << 0; | ||
888 | } | ||
889 | static inline u32 fb_mmu_fault_buffer_put_ptr_v(u32 r) | ||
890 | { | ||
891 | return (r >> 0) & 0xfffff; | ||
892 | } | ||
893 | static inline u32 fb_mmu_fault_buffer_put_getptr_corrupted_f(u32 v) | ||
894 | { | ||
895 | return (v & 0x1) << 30; | ||
896 | } | ||
897 | static inline u32 fb_mmu_fault_buffer_put_getptr_corrupted_v(u32 r) | ||
898 | { | ||
899 | return (r >> 30) & 0x1; | ||
900 | } | ||
901 | static inline u32 fb_mmu_fault_buffer_put_getptr_corrupted_yes_v(void) | ||
902 | { | ||
903 | return 0x00000001; | ||
904 | } | ||
905 | static inline u32 fb_mmu_fault_buffer_put_getptr_corrupted_yes_f(void) | ||
906 | { | ||
907 | return 0x40000000; | ||
908 | } | ||
909 | static inline u32 fb_mmu_fault_buffer_put_getptr_corrupted_no_v(void) | ||
910 | { | ||
911 | return 0x00000000; | ||
912 | } | ||
913 | static inline u32 fb_mmu_fault_buffer_put_getptr_corrupted_no_f(void) | ||
914 | { | ||
915 | return 0x0; | ||
916 | } | ||
917 | static inline u32 fb_mmu_fault_buffer_put_overflow_f(u32 v) | ||
918 | { | ||
919 | return (v & 0x1) << 31; | ||
920 | } | ||
921 | static inline u32 fb_mmu_fault_buffer_put_overflow_v(u32 r) | ||
922 | { | ||
923 | return (r >> 31) & 0x1; | ||
924 | } | ||
925 | static inline u32 fb_mmu_fault_buffer_put_overflow_yes_v(void) | ||
926 | { | ||
927 | return 0x00000001; | ||
928 | } | ||
929 | static inline u32 fb_mmu_fault_buffer_put_overflow_yes_f(void) | ||
930 | { | ||
931 | return 0x80000000; | ||
932 | } | ||
933 | static inline u32 fb_mmu_fault_buffer_size_r(u32 i) | ||
934 | { | ||
935 | return 0x00100e34 + i*20; | ||
936 | } | ||
937 | static inline u32 fb_mmu_fault_buffer_size__size_1_v(void) | ||
938 | { | ||
939 | return 0x00000002; | ||
940 | } | ||
941 | static inline u32 fb_mmu_fault_buffer_size_val_f(u32 v) | ||
942 | { | ||
943 | return (v & 0xfffff) << 0; | ||
944 | } | ||
945 | static inline u32 fb_mmu_fault_buffer_size_val_v(u32 r) | ||
946 | { | ||
947 | return (r >> 0) & 0xfffff; | ||
948 | } | ||
949 | static inline u32 fb_mmu_fault_buffer_size_overflow_intr_f(u32 v) | ||
950 | { | ||
951 | return (v & 0x1) << 29; | ||
952 | } | ||
953 | static inline u32 fb_mmu_fault_buffer_size_overflow_intr_v(u32 r) | ||
954 | { | ||
955 | return (r >> 29) & 0x1; | ||
956 | } | ||
957 | static inline u32 fb_mmu_fault_buffer_size_overflow_intr_enable_v(void) | ||
958 | { | ||
959 | return 0x00000001; | ||
960 | } | ||
961 | static inline u32 fb_mmu_fault_buffer_size_overflow_intr_enable_f(void) | ||
962 | { | ||
963 | return 0x20000000; | ||
964 | } | ||
965 | static inline u32 fb_mmu_fault_buffer_size_set_default_f(u32 v) | ||
966 | { | ||
967 | return (v & 0x1) << 30; | ||
968 | } | ||
969 | static inline u32 fb_mmu_fault_buffer_size_set_default_v(u32 r) | ||
970 | { | ||
971 | return (r >> 30) & 0x1; | ||
972 | } | ||
973 | static inline u32 fb_mmu_fault_buffer_size_set_default_yes_v(void) | ||
974 | { | ||
975 | return 0x00000001; | ||
976 | } | ||
977 | static inline u32 fb_mmu_fault_buffer_size_set_default_yes_f(void) | ||
978 | { | ||
979 | return 0x40000000; | ||
980 | } | ||
981 | static inline u32 fb_mmu_fault_buffer_size_enable_f(u32 v) | ||
982 | { | ||
983 | return (v & 0x1) << 31; | ||
984 | } | ||
985 | static inline u32 fb_mmu_fault_buffer_size_enable_v(u32 r) | ||
986 | { | ||
987 | return (r >> 31) & 0x1; | ||
988 | } | ||
989 | static inline u32 fb_mmu_fault_buffer_size_enable_true_v(void) | ||
990 | { | ||
991 | return 0x00000001; | ||
992 | } | ||
993 | static inline u32 fb_mmu_fault_buffer_size_enable_true_f(void) | ||
994 | { | ||
995 | return 0x80000000; | ||
996 | } | ||
997 | static inline u32 fb_mmu_fault_addr_lo_r(void) | ||
998 | { | ||
999 | return 0x00100e4c; | ||
1000 | } | ||
1001 | static inline u32 fb_mmu_fault_addr_lo_phys_aperture_f(u32 v) | ||
1002 | { | ||
1003 | return (v & 0x3) << 0; | ||
1004 | } | ||
1005 | static inline u32 fb_mmu_fault_addr_lo_phys_aperture_v(u32 r) | ||
1006 | { | ||
1007 | return (r >> 0) & 0x3; | ||
1008 | } | ||
1009 | static inline u32 fb_mmu_fault_addr_lo_phys_aperture_sys_coh_v(void) | ||
1010 | { | ||
1011 | return 0x00000002; | ||
1012 | } | ||
1013 | static inline u32 fb_mmu_fault_addr_lo_phys_aperture_sys_coh_f(void) | ||
1014 | { | ||
1015 | return 0x2; | ||
1016 | } | ||
1017 | static inline u32 fb_mmu_fault_addr_lo_phys_aperture_sys_nocoh_v(void) | ||
1018 | { | ||
1019 | return 0x00000003; | ||
1020 | } | ||
1021 | static inline u32 fb_mmu_fault_addr_lo_phys_aperture_sys_nocoh_f(void) | ||
1022 | { | ||
1023 | return 0x3; | ||
1024 | } | ||
1025 | static inline u32 fb_mmu_fault_addr_lo_addr_f(u32 v) | ||
1026 | { | ||
1027 | return (v & 0xfffff) << 12; | ||
1028 | } | ||
1029 | static inline u32 fb_mmu_fault_addr_lo_addr_v(u32 r) | ||
1030 | { | ||
1031 | return (r >> 12) & 0xfffff; | ||
1032 | } | ||
1033 | static inline u32 fb_mmu_fault_addr_hi_r(void) | ||
1034 | { | ||
1035 | return 0x00100e50; | ||
1036 | } | ||
1037 | static inline u32 fb_mmu_fault_addr_hi_addr_f(u32 v) | ||
1038 | { | ||
1039 | return (v & 0xffffffff) << 0; | ||
1040 | } | ||
1041 | static inline u32 fb_mmu_fault_addr_hi_addr_v(u32 r) | ||
1042 | { | ||
1043 | return (r >> 0) & 0xffffffff; | ||
1044 | } | ||
1045 | static inline u32 fb_mmu_fault_inst_lo_r(void) | ||
1046 | { | ||
1047 | return 0x00100e54; | ||
1048 | } | ||
1049 | static inline u32 fb_mmu_fault_inst_lo_engine_id_v(u32 r) | ||
1050 | { | ||
1051 | return (r >> 0) & 0x1ff; | ||
1052 | } | ||
1053 | static inline u32 fb_mmu_fault_inst_lo_aperture_v(u32 r) | ||
1054 | { | ||
1055 | return (r >> 10) & 0x3; | ||
1056 | } | ||
1057 | static inline u32 fb_mmu_fault_inst_lo_aperture_sys_coh_v(void) | ||
1058 | { | ||
1059 | return 0x00000002; | ||
1060 | } | ||
1061 | static inline u32 fb_mmu_fault_inst_lo_aperture_sys_nocoh_v(void) | ||
1062 | { | ||
1063 | return 0x00000003; | ||
1064 | } | ||
1065 | static inline u32 fb_mmu_fault_inst_lo_addr_f(u32 v) | ||
1066 | { | ||
1067 | return (v & 0xfffff) << 12; | ||
1068 | } | ||
1069 | static inline u32 fb_mmu_fault_inst_lo_addr_v(u32 r) | ||
1070 | { | ||
1071 | return (r >> 12) & 0xfffff; | ||
1072 | } | ||
1073 | static inline u32 fb_mmu_fault_inst_hi_r(void) | ||
1074 | { | ||
1075 | return 0x00100e58; | ||
1076 | } | ||
1077 | static inline u32 fb_mmu_fault_inst_hi_addr_v(u32 r) | ||
1078 | { | ||
1079 | return (r >> 0) & 0xffffffff; | ||
1080 | } | ||
1081 | static inline u32 fb_mmu_fault_info_r(void) | ||
1082 | { | ||
1083 | return 0x00100e5c; | ||
1084 | } | ||
1085 | static inline u32 fb_mmu_fault_info_fault_type_v(u32 r) | ||
1086 | { | ||
1087 | return (r >> 0) & 0x1f; | ||
1088 | } | ||
1089 | static inline u32 fb_mmu_fault_info_replayable_fault_v(u32 r) | ||
1090 | { | ||
1091 | return (r >> 7) & 0x1; | ||
1092 | } | ||
1093 | static inline u32 fb_mmu_fault_info_client_v(u32 r) | ||
1094 | { | ||
1095 | return (r >> 8) & 0x7f; | ||
1096 | } | ||
1097 | static inline u32 fb_mmu_fault_info_access_type_v(u32 r) | ||
1098 | { | ||
1099 | return (r >> 16) & 0xf; | ||
1100 | } | ||
1101 | static inline u32 fb_mmu_fault_info_client_type_v(u32 r) | ||
1102 | { | ||
1103 | return (r >> 20) & 0x1; | ||
1104 | } | ||
1105 | static inline u32 fb_mmu_fault_info_gpc_id_v(u32 r) | ||
1106 | { | ||
1107 | return (r >> 24) & 0x1f; | ||
1108 | } | ||
1109 | static inline u32 fb_mmu_fault_info_protected_mode_v(u32 r) | ||
1110 | { | ||
1111 | return (r >> 29) & 0x1; | ||
1112 | } | ||
1113 | static inline u32 fb_mmu_fault_info_replayable_fault_en_v(u32 r) | ||
1114 | { | ||
1115 | return (r >> 30) & 0x1; | ||
1116 | } | ||
1117 | static inline u32 fb_mmu_fault_info_valid_v(u32 r) | ||
1118 | { | ||
1119 | return (r >> 31) & 0x1; | ||
1120 | } | ||
1121 | static inline u32 fb_mmu_fault_status_r(void) | ||
1122 | { | ||
1123 | return 0x00100e60; | ||
1124 | } | ||
1125 | static inline u32 fb_mmu_fault_status_dropped_bar1_phys_f(u32 v) | ||
1126 | { | ||
1127 | return (v & 0x1) << 0; | ||
1128 | } | ||
1129 | static inline u32 fb_mmu_fault_status_dropped_bar1_phys_v(u32 r) | ||
1130 | { | ||
1131 | return (r >> 0) & 0x1; | ||
1132 | } | ||
1133 | static inline u32 fb_mmu_fault_status_dropped_bar1_phys_set_v(void) | ||
1134 | { | ||
1135 | return 0x00000001; | ||
1136 | } | ||
1137 | static inline u32 fb_mmu_fault_status_dropped_bar1_phys_set_f(void) | ||
1138 | { | ||
1139 | return 0x1; | ||
1140 | } | ||
1141 | static inline u32 fb_mmu_fault_status_dropped_bar1_phys_clear_v(void) | ||
1142 | { | ||
1143 | return 0x00000001; | ||
1144 | } | ||
1145 | static inline u32 fb_mmu_fault_status_dropped_bar1_phys_clear_f(void) | ||
1146 | { | ||
1147 | return 0x1; | ||
1148 | } | ||
1149 | static inline u32 fb_mmu_fault_status_dropped_bar1_virt_f(u32 v) | ||
1150 | { | ||
1151 | return (v & 0x1) << 1; | ||
1152 | } | ||
1153 | static inline u32 fb_mmu_fault_status_dropped_bar1_virt_v(u32 r) | ||
1154 | { | ||
1155 | return (r >> 1) & 0x1; | ||
1156 | } | ||
1157 | static inline u32 fb_mmu_fault_status_dropped_bar1_virt_set_v(void) | ||
1158 | { | ||
1159 | return 0x00000001; | ||
1160 | } | ||
1161 | static inline u32 fb_mmu_fault_status_dropped_bar1_virt_set_f(void) | ||
1162 | { | ||
1163 | return 0x2; | ||
1164 | } | ||
1165 | static inline u32 fb_mmu_fault_status_dropped_bar1_virt_clear_v(void) | ||
1166 | { | ||
1167 | return 0x00000001; | ||
1168 | } | ||
1169 | static inline u32 fb_mmu_fault_status_dropped_bar1_virt_clear_f(void) | ||
1170 | { | ||
1171 | return 0x2; | ||
1172 | } | ||
1173 | static inline u32 fb_mmu_fault_status_dropped_bar2_phys_f(u32 v) | ||
1174 | { | ||
1175 | return (v & 0x1) << 2; | ||
1176 | } | ||
1177 | static inline u32 fb_mmu_fault_status_dropped_bar2_phys_v(u32 r) | ||
1178 | { | ||
1179 | return (r >> 2) & 0x1; | ||
1180 | } | ||
1181 | static inline u32 fb_mmu_fault_status_dropped_bar2_phys_set_v(void) | ||
1182 | { | ||
1183 | return 0x00000001; | ||
1184 | } | ||
1185 | static inline u32 fb_mmu_fault_status_dropped_bar2_phys_set_f(void) | ||
1186 | { | ||
1187 | return 0x4; | ||
1188 | } | ||
1189 | static inline u32 fb_mmu_fault_status_dropped_bar2_phys_clear_v(void) | ||
1190 | { | ||
1191 | return 0x00000001; | ||
1192 | } | ||
1193 | static inline u32 fb_mmu_fault_status_dropped_bar2_phys_clear_f(void) | ||
1194 | { | ||
1195 | return 0x4; | ||
1196 | } | ||
1197 | static inline u32 fb_mmu_fault_status_dropped_bar2_virt_f(u32 v) | ||
1198 | { | ||
1199 | return (v & 0x1) << 3; | ||
1200 | } | ||
1201 | static inline u32 fb_mmu_fault_status_dropped_bar2_virt_v(u32 r) | ||
1202 | { | ||
1203 | return (r >> 3) & 0x1; | ||
1204 | } | ||
1205 | static inline u32 fb_mmu_fault_status_dropped_bar2_virt_set_v(void) | ||
1206 | { | ||
1207 | return 0x00000001; | ||
1208 | } | ||
1209 | static inline u32 fb_mmu_fault_status_dropped_bar2_virt_set_f(void) | ||
1210 | { | ||
1211 | return 0x8; | ||
1212 | } | ||
1213 | static inline u32 fb_mmu_fault_status_dropped_bar2_virt_clear_v(void) | ||
1214 | { | ||
1215 | return 0x00000001; | ||
1216 | } | ||
1217 | static inline u32 fb_mmu_fault_status_dropped_bar2_virt_clear_f(void) | ||
1218 | { | ||
1219 | return 0x8; | ||
1220 | } | ||
1221 | static inline u32 fb_mmu_fault_status_dropped_ifb_phys_f(u32 v) | ||
1222 | { | ||
1223 | return (v & 0x1) << 4; | ||
1224 | } | ||
1225 | static inline u32 fb_mmu_fault_status_dropped_ifb_phys_v(u32 r) | ||
1226 | { | ||
1227 | return (r >> 4) & 0x1; | ||
1228 | } | ||
1229 | static inline u32 fb_mmu_fault_status_dropped_ifb_phys_set_v(void) | ||
1230 | { | ||
1231 | return 0x00000001; | ||
1232 | } | ||
1233 | static inline u32 fb_mmu_fault_status_dropped_ifb_phys_set_f(void) | ||
1234 | { | ||
1235 | return 0x10; | ||
1236 | } | ||
1237 | static inline u32 fb_mmu_fault_status_dropped_ifb_phys_clear_v(void) | ||
1238 | { | ||
1239 | return 0x00000001; | ||
1240 | } | ||
1241 | static inline u32 fb_mmu_fault_status_dropped_ifb_phys_clear_f(void) | ||
1242 | { | ||
1243 | return 0x10; | ||
1244 | } | ||
1245 | static inline u32 fb_mmu_fault_status_dropped_ifb_virt_f(u32 v) | ||
1246 | { | ||
1247 | return (v & 0x1) << 5; | ||
1248 | } | ||
1249 | static inline u32 fb_mmu_fault_status_dropped_ifb_virt_v(u32 r) | ||
1250 | { | ||
1251 | return (r >> 5) & 0x1; | ||
1252 | } | ||
1253 | static inline u32 fb_mmu_fault_status_dropped_ifb_virt_set_v(void) | ||
1254 | { | ||
1255 | return 0x00000001; | ||
1256 | } | ||
1257 | static inline u32 fb_mmu_fault_status_dropped_ifb_virt_set_f(void) | ||
1258 | { | ||
1259 | return 0x20; | ||
1260 | } | ||
1261 | static inline u32 fb_mmu_fault_status_dropped_ifb_virt_clear_v(void) | ||
1262 | { | ||
1263 | return 0x00000001; | ||
1264 | } | ||
1265 | static inline u32 fb_mmu_fault_status_dropped_ifb_virt_clear_f(void) | ||
1266 | { | ||
1267 | return 0x20; | ||
1268 | } | ||
1269 | static inline u32 fb_mmu_fault_status_dropped_other_phys_f(u32 v) | ||
1270 | { | ||
1271 | return (v & 0x1) << 6; | ||
1272 | } | ||
1273 | static inline u32 fb_mmu_fault_status_dropped_other_phys_v(u32 r) | ||
1274 | { | ||
1275 | return (r >> 6) & 0x1; | ||
1276 | } | ||
1277 | static inline u32 fb_mmu_fault_status_dropped_other_phys_set_v(void) | ||
1278 | { | ||
1279 | return 0x00000001; | ||
1280 | } | ||
1281 | static inline u32 fb_mmu_fault_status_dropped_other_phys_set_f(void) | ||
1282 | { | ||
1283 | return 0x40; | ||
1284 | } | ||
1285 | static inline u32 fb_mmu_fault_status_dropped_other_phys_clear_v(void) | ||
1286 | { | ||
1287 | return 0x00000001; | ||
1288 | } | ||
1289 | static inline u32 fb_mmu_fault_status_dropped_other_phys_clear_f(void) | ||
1290 | { | ||
1291 | return 0x40; | ||
1292 | } | ||
1293 | static inline u32 fb_mmu_fault_status_dropped_other_virt_f(u32 v) | ||
1294 | { | ||
1295 | return (v & 0x1) << 7; | ||
1296 | } | ||
1297 | static inline u32 fb_mmu_fault_status_dropped_other_virt_v(u32 r) | ||
1298 | { | ||
1299 | return (r >> 7) & 0x1; | ||
1300 | } | ||
1301 | static inline u32 fb_mmu_fault_status_dropped_other_virt_set_v(void) | ||
1302 | { | ||
1303 | return 0x00000001; | ||
1304 | } | ||
1305 | static inline u32 fb_mmu_fault_status_dropped_other_virt_set_f(void) | ||
1306 | { | ||
1307 | return 0x80; | ||
1308 | } | ||
1309 | static inline u32 fb_mmu_fault_status_dropped_other_virt_clear_v(void) | ||
1310 | { | ||
1311 | return 0x00000001; | ||
1312 | } | ||
1313 | static inline u32 fb_mmu_fault_status_dropped_other_virt_clear_f(void) | ||
1314 | { | ||
1315 | return 0x80; | ||
1316 | } | ||
1317 | static inline u32 fb_mmu_fault_status_replayable_f(u32 v) | ||
1318 | { | ||
1319 | return (v & 0x1) << 8; | ||
1320 | } | ||
1321 | static inline u32 fb_mmu_fault_status_replayable_v(u32 r) | ||
1322 | { | ||
1323 | return (r >> 8) & 0x1; | ||
1324 | } | ||
1325 | static inline u32 fb_mmu_fault_status_replayable_set_v(void) | ||
1326 | { | ||
1327 | return 0x00000001; | ||
1328 | } | ||
1329 | static inline u32 fb_mmu_fault_status_replayable_set_f(void) | ||
1330 | { | ||
1331 | return 0x100; | ||
1332 | } | ||
1333 | static inline u32 fb_mmu_fault_status_non_replayable_f(u32 v) | ||
1334 | { | ||
1335 | return (v & 0x1) << 9; | ||
1336 | } | ||
1337 | static inline u32 fb_mmu_fault_status_non_replayable_v(u32 r) | ||
1338 | { | ||
1339 | return (r >> 9) & 0x1; | ||
1340 | } | ||
1341 | static inline u32 fb_mmu_fault_status_non_replayable_set_v(void) | ||
1342 | { | ||
1343 | return 0x00000001; | ||
1344 | } | ||
1345 | static inline u32 fb_mmu_fault_status_non_replayable_set_f(void) | ||
1346 | { | ||
1347 | return 0x200; | ||
1348 | } | ||
1349 | static inline u32 fb_mmu_fault_status_replayable_error_f(u32 v) | ||
1350 | { | ||
1351 | return (v & 0x1) << 10; | ||
1352 | } | ||
1353 | static inline u32 fb_mmu_fault_status_replayable_error_v(u32 r) | ||
1354 | { | ||
1355 | return (r >> 10) & 0x1; | ||
1356 | } | ||
1357 | static inline u32 fb_mmu_fault_status_replayable_error_set_v(void) | ||
1358 | { | ||
1359 | return 0x00000001; | ||
1360 | } | ||
1361 | static inline u32 fb_mmu_fault_status_replayable_error_set_f(void) | ||
1362 | { | ||
1363 | return 0x400; | ||
1364 | } | ||
1365 | static inline u32 fb_mmu_fault_status_non_replayable_error_f(u32 v) | ||
1366 | { | ||
1367 | return (v & 0x1) << 11; | ||
1368 | } | ||
1369 | static inline u32 fb_mmu_fault_status_non_replayable_error_v(u32 r) | ||
1370 | { | ||
1371 | return (r >> 11) & 0x1; | ||
1372 | } | ||
1373 | static inline u32 fb_mmu_fault_status_non_replayable_error_set_v(void) | ||
1374 | { | ||
1375 | return 0x00000001; | ||
1376 | } | ||
1377 | static inline u32 fb_mmu_fault_status_non_replayable_error_set_f(void) | ||
1378 | { | ||
1379 | return 0x800; | ||
1380 | } | ||
1381 | static inline u32 fb_mmu_fault_status_replayable_overflow_f(u32 v) | ||
1382 | { | ||
1383 | return (v & 0x1) << 12; | ||
1384 | } | ||
1385 | static inline u32 fb_mmu_fault_status_replayable_overflow_v(u32 r) | ||
1386 | { | ||
1387 | return (r >> 12) & 0x1; | ||
1388 | } | ||
1389 | static inline u32 fb_mmu_fault_status_replayable_overflow_set_v(void) | ||
1390 | { | ||
1391 | return 0x00000001; | ||
1392 | } | ||
1393 | static inline u32 fb_mmu_fault_status_replayable_overflow_set_f(void) | ||
1394 | { | ||
1395 | return 0x1000; | ||
1396 | } | ||
1397 | static inline u32 fb_mmu_fault_status_non_replayable_overflow_f(u32 v) | ||
1398 | { | ||
1399 | return (v & 0x1) << 13; | ||
1400 | } | ||
1401 | static inline u32 fb_mmu_fault_status_non_replayable_overflow_v(u32 r) | ||
1402 | { | ||
1403 | return (r >> 13) & 0x1; | ||
1404 | } | ||
1405 | static inline u32 fb_mmu_fault_status_non_replayable_overflow_set_v(void) | ||
1406 | { | ||
1407 | return 0x00000001; | ||
1408 | } | ||
1409 | static inline u32 fb_mmu_fault_status_non_replayable_overflow_set_f(void) | ||
1410 | { | ||
1411 | return 0x2000; | ||
1412 | } | ||
1413 | static inline u32 fb_mmu_fault_status_replayable_getptr_corrupted_f(u32 v) | ||
1414 | { | ||
1415 | return (v & 0x1) << 14; | ||
1416 | } | ||
1417 | static inline u32 fb_mmu_fault_status_replayable_getptr_corrupted_v(u32 r) | ||
1418 | { | ||
1419 | return (r >> 14) & 0x1; | ||
1420 | } | ||
1421 | static inline u32 fb_mmu_fault_status_replayable_getptr_corrupted_set_v(void) | ||
1422 | { | ||
1423 | return 0x00000001; | ||
1424 | } | ||
1425 | static inline u32 fb_mmu_fault_status_replayable_getptr_corrupted_set_f(void) | ||
1426 | { | ||
1427 | return 0x4000; | ||
1428 | } | ||
1429 | static inline u32 fb_mmu_fault_status_non_replayable_getptr_corrupted_f(u32 v) | ||
1430 | { | ||
1431 | return (v & 0x1) << 15; | ||
1432 | } | ||
1433 | static inline u32 fb_mmu_fault_status_non_replayable_getptr_corrupted_v(u32 r) | ||
1434 | { | ||
1435 | return (r >> 15) & 0x1; | ||
1436 | } | ||
1437 | static inline u32 fb_mmu_fault_status_non_replayable_getptr_corrupted_set_v(void) | ||
1438 | { | ||
1439 | return 0x00000001; | ||
1440 | } | ||
1441 | static inline u32 fb_mmu_fault_status_non_replayable_getptr_corrupted_set_f(void) | ||
1442 | { | ||
1443 | return 0x8000; | ||
1444 | } | ||
1445 | static inline u32 fb_mmu_fault_status_busy_f(u32 v) | ||
1446 | { | ||
1447 | return (v & 0x1) << 30; | ||
1448 | } | ||
1449 | static inline u32 fb_mmu_fault_status_busy_v(u32 r) | ||
1450 | { | ||
1451 | return (r >> 30) & 0x1; | ||
1452 | } | ||
1453 | static inline u32 fb_mmu_fault_status_busy_true_v(void) | ||
1454 | { | ||
1455 | return 0x00000001; | ||
1456 | } | ||
1457 | static inline u32 fb_mmu_fault_status_busy_true_f(void) | ||
1458 | { | ||
1459 | return 0x40000000; | ||
1460 | } | ||
1461 | static inline u32 fb_mmu_fault_status_valid_f(u32 v) | ||
1462 | { | ||
1463 | return (v & 0x1) << 31; | ||
1464 | } | ||
1465 | static inline u32 fb_mmu_fault_status_valid_v(u32 r) | ||
1466 | { | ||
1467 | return (r >> 31) & 0x1; | ||
1468 | } | ||
1469 | static inline u32 fb_mmu_fault_status_valid_set_v(void) | ||
1470 | { | ||
1471 | return 0x00000001; | ||
1472 | } | ||
1473 | static inline u32 fb_mmu_fault_status_valid_set_f(void) | ||
1474 | { | ||
1475 | return 0x80000000; | ||
1476 | } | ||
1477 | static inline u32 fb_mmu_fault_status_valid_clear_v(void) | ||
1478 | { | ||
1479 | return 0x00000001; | ||
1480 | } | ||
1481 | static inline u32 fb_mmu_fault_status_valid_clear_f(void) | ||
1482 | { | ||
1483 | return 0x80000000; | ||
1484 | } | ||
1485 | #endif | ||