diff options
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/nvgpu/gm20b/hw_trim_gm20b.h | 148 |
1 files changed, 148 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/gm20b/hw_trim_gm20b.h b/drivers/gpu/nvgpu/gm20b/hw_trim_gm20b.h index 487cd959..bab9242c 100644 --- a/drivers/gpu/nvgpu/gm20b/hw_trim_gm20b.h +++ b/drivers/gpu/nvgpu/gm20b/hw_trim_gm20b.h | |||
@@ -266,6 +266,30 @@ static inline u32 trim_sys_gpcpll_cfg2_r(void) | |||
266 | { | 266 | { |
267 | return 0x0013700c; | 267 | return 0x0013700c; |
268 | } | 268 | } |
269 | static inline u32 trim_sys_gpcpll_cfg2_sdm_din_f(u32 v) | ||
270 | { | ||
271 | return (v & 0xff) << 0; | ||
272 | } | ||
273 | static inline u32 trim_sys_gpcpll_cfg2_sdm_din_m(void) | ||
274 | { | ||
275 | return 0xff << 0; | ||
276 | } | ||
277 | static inline u32 trim_sys_gpcpll_cfg2_sdm_din_v(u32 r) | ||
278 | { | ||
279 | return (r >> 0) & 0xff; | ||
280 | } | ||
281 | static inline u32 trim_sys_gpcpll_cfg2_sdm_din_new_f(u32 v) | ||
282 | { | ||
283 | return (v & 0xff) << 8; | ||
284 | } | ||
285 | static inline u32 trim_sys_gpcpll_cfg2_sdm_din_new_m(void) | ||
286 | { | ||
287 | return 0xff << 8; | ||
288 | } | ||
289 | static inline u32 trim_sys_gpcpll_cfg2_sdm_din_new_v(u32 r) | ||
290 | { | ||
291 | return (r >> 8) & 0xff; | ||
292 | } | ||
269 | static inline u32 trim_sys_gpcpll_cfg2_pll_stepa_f(u32 v) | 293 | static inline u32 trim_sys_gpcpll_cfg2_pll_stepa_f(u32 v) |
270 | { | 294 | { |
271 | return (v & 0xff) << 24; | 295 | return (v & 0xff) << 24; |
@@ -278,6 +302,14 @@ static inline u32 trim_sys_gpcpll_cfg3_r(void) | |||
278 | { | 302 | { |
279 | return 0x00137018; | 303 | return 0x00137018; |
280 | } | 304 | } |
305 | static inline u32 trim_sys_gpcpll_cfg3_vco_ctrl_f(u32 v) | ||
306 | { | ||
307 | return (v & 0x1ff) << 0; | ||
308 | } | ||
309 | static inline u32 trim_sys_gpcpll_cfg3_vco_ctrl_m(void) | ||
310 | { | ||
311 | return 0x1ff << 0; | ||
312 | } | ||
281 | static inline u32 trim_sys_gpcpll_cfg3_pll_stepb_f(u32 v) | 313 | static inline u32 trim_sys_gpcpll_cfg3_pll_stepb_f(u32 v) |
282 | { | 314 | { |
283 | return (v & 0xff) << 16; | 315 | return (v & 0xff) << 16; |
@@ -286,6 +318,122 @@ static inline u32 trim_sys_gpcpll_cfg3_pll_stepb_m(void) | |||
286 | { | 318 | { |
287 | return 0xff << 16; | 319 | return 0xff << 16; |
288 | } | 320 | } |
321 | static inline u32 trim_sys_gpcpll_dvfs0_r(void) | ||
322 | { | ||
323 | return 0x00137010; | ||
324 | } | ||
325 | static inline u32 trim_sys_gpcpll_dvfs0_dfs_coeff_f(u32 v) | ||
326 | { | ||
327 | return (v & 0x7f) << 0; | ||
328 | } | ||
329 | static inline u32 trim_sys_gpcpll_dvfs0_dfs_coeff_m(void) | ||
330 | { | ||
331 | return 0x7f << 0; | ||
332 | } | ||
333 | static inline u32 trim_sys_gpcpll_dvfs0_dfs_coeff_v(u32 r) | ||
334 | { | ||
335 | return (r >> 0) & 0x7f; | ||
336 | } | ||
337 | static inline u32 trim_sys_gpcpll_dvfs0_dfs_det_max_f(u32 v) | ||
338 | { | ||
339 | return (v & 0x7f) << 8; | ||
340 | } | ||
341 | static inline u32 trim_sys_gpcpll_dvfs0_dfs_det_max_m(void) | ||
342 | { | ||
343 | return 0x7f << 8; | ||
344 | } | ||
345 | static inline u32 trim_sys_gpcpll_dvfs0_dfs_det_max_v(u32 r) | ||
346 | { | ||
347 | return (r >> 8) & 0x7f; | ||
348 | } | ||
349 | static inline u32 trim_sys_gpcpll_dvfs0_dfs_dc_offset_f(u32 v) | ||
350 | { | ||
351 | return (v & 0x3f) << 16; | ||
352 | } | ||
353 | static inline u32 trim_sys_gpcpll_dvfs0_dfs_dc_offset_m(void) | ||
354 | { | ||
355 | return 0x3f << 16; | ||
356 | } | ||
357 | static inline u32 trim_sys_gpcpll_dvfs0_dfs_dc_offset_v(u32 r) | ||
358 | { | ||
359 | return (r >> 16) & 0x3f; | ||
360 | } | ||
361 | static inline u32 trim_sys_gpcpll_dvfs0_mode_m(void) | ||
362 | { | ||
363 | return 0x1 << 28; | ||
364 | } | ||
365 | static inline u32 trim_sys_gpcpll_dvfs0_mode_dvfspll_f(void) | ||
366 | { | ||
367 | return 0x0; | ||
368 | } | ||
369 | static inline u32 trim_sys_gpcpll_dvfs1_r(void) | ||
370 | { | ||
371 | return 0x00137014; | ||
372 | } | ||
373 | static inline u32 trim_sys_gpcpll_dvfs1_dfs_ext_det_f(u32 v) | ||
374 | { | ||
375 | return (v & 0x7f) << 0; | ||
376 | } | ||
377 | static inline u32 trim_sys_gpcpll_dvfs1_dfs_ext_det_m(void) | ||
378 | { | ||
379 | return 0x7f << 0; | ||
380 | } | ||
381 | static inline u32 trim_sys_gpcpll_dvfs1_dfs_ext_det_v(u32 r) | ||
382 | { | ||
383 | return (r >> 0) & 0x7f; | ||
384 | } | ||
385 | static inline u32 trim_sys_gpcpll_dvfs1_dfs_ext_strb_m(void) | ||
386 | { | ||
387 | return 0x1 << 7; | ||
388 | } | ||
389 | static inline u32 trim_sys_gpcpll_dvfs1_dfs_ext_cal_f(u32 v) | ||
390 | { | ||
391 | return (v & 0x7f) << 8; | ||
392 | } | ||
393 | static inline u32 trim_sys_gpcpll_dvfs1_dfs_ext_cal_m(void) | ||
394 | { | ||
395 | return 0x7f << 8; | ||
396 | } | ||
397 | static inline u32 trim_sys_gpcpll_dvfs1_dfs_ext_cal_v(u32 r) | ||
398 | { | ||
399 | return (r >> 8) & 0x7f; | ||
400 | } | ||
401 | static inline u32 trim_sys_gpcpll_dvfs1_dfs_ext_sel_m(void) | ||
402 | { | ||
403 | return 0x1 << 15; | ||
404 | } | ||
405 | static inline u32 trim_sys_gpcpll_dvfs1_dfs_ctrl_f(u32 v) | ||
406 | { | ||
407 | return (v & 0xfff) << 16; | ||
408 | } | ||
409 | static inline u32 trim_sys_gpcpll_dvfs1_dfs_ctrl_m(void) | ||
410 | { | ||
411 | return 0xfff << 16; | ||
412 | } | ||
413 | static inline u32 trim_sys_gpcpll_dvfs1_dfs_ctrl_v(u32 r) | ||
414 | { | ||
415 | return (r >> 16) & 0xfff; | ||
416 | } | ||
417 | static inline u32 trim_sys_gpcpll_dvfs1_en_sdm_m(void) | ||
418 | { | ||
419 | return 0x1 << 28; | ||
420 | } | ||
421 | static inline u32 trim_sys_gpcpll_dvfs1_en_dfs_m(void) | ||
422 | { | ||
423 | return 0x1 << 29; | ||
424 | } | ||
425 | static inline u32 trim_sys_gpcpll_dvfs1_en_dfs_cal_m(void) | ||
426 | { | ||
427 | return 0x1 << 30; | ||
428 | } | ||
429 | static inline u32 trim_sys_gpcpll_dvfs1_dfs_cal_done_v(u32 r) | ||
430 | { | ||
431 | return (r >> 31) & 0x1; | ||
432 | } | ||
433 | static inline u32 trim_sys_gpcpll_dvfs2_r(void) | ||
434 | { | ||
435 | return 0x00137020; | ||
436 | } | ||
289 | static inline u32 trim_sys_gpcpll_ndiv_slowdown_r(void) | 437 | static inline u32 trim_sys_gpcpll_ndiv_slowdown_r(void) |
290 | { | 438 | { |
291 | return 0x0013701c; | 439 | return 0x0013701c; |