summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gp10b/hw_therm_gp10b.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/nvgpu/gp10b/hw_therm_gp10b.h')
-rw-r--r--drivers/gpu/nvgpu/gp10b/hw_therm_gp10b.h120
1 files changed, 120 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/gp10b/hw_therm_gp10b.h b/drivers/gpu/nvgpu/gp10b/hw_therm_gp10b.h
index aed75481..17b1fb7e 100644
--- a/drivers/gpu/nvgpu/gp10b/hw_therm_gp10b.h
+++ b/drivers/gpu/nvgpu/gp10b/hw_therm_gp10b.h
@@ -170,6 +170,18 @@ static inline u32 therm_config1_r(void)
170{ 170{
171 return 0x00020050; 171 return 0x00020050;
172} 172}
173static inline u32 therm_config2_r(void)
174{
175 return 0x00020130;
176}
177static inline u32 therm_config2_slowdown_factor_extended_f(u32 v)
178{
179 return (v & 0x1) << 24;
180}
181static inline u32 therm_config2_grad_enable_f(u32 v)
182{
183 return (v & 0x1) << 31;
184}
173static inline u32 therm_gate_ctrl_r(u32 i) 185static inline u32 therm_gate_ctrl_r(u32 i)
174{ 186{
175 return 0x00020200 + i*4; 187 return 0x00020200 + i*4;
@@ -278,4 +290,112 @@ static inline u32 therm_clk_slowdown_idle_factor_disabled_f(void)
278{ 290{
279 return 0x0; 291 return 0x0;
280} 292}
293static inline u32 therm_grad_stepping_table_r(u32 i)
294{
295 return 0x000202c8 + i*4;
296}
297static inline u32 therm_grad_stepping_table_slowdown_factor0_f(u32 v)
298{
299 return (v & 0x3f) << 0;
300}
301static inline u32 therm_grad_stepping_table_slowdown_factor0_m(void)
302{
303 return 0x3f << 0;
304}
305static inline u32 therm_grad_stepping_table_slowdown_factor0_fpdiv_by1p5_f(void)
306{
307 return 0x1;
308}
309static inline u32 therm_grad_stepping_table_slowdown_factor0_fpdiv_by2_f(void)
310{
311 return 0x2;
312}
313static inline u32 therm_grad_stepping_table_slowdown_factor0_fpdiv_by4_f(void)
314{
315 return 0x6;
316}
317static inline u32 therm_grad_stepping_table_slowdown_factor0_fpdiv_by8_f(void)
318{
319 return 0xe;
320}
321static inline u32 therm_grad_stepping_table_slowdown_factor1_f(u32 v)
322{
323 return (v & 0x3f) << 6;
324}
325static inline u32 therm_grad_stepping_table_slowdown_factor1_m(void)
326{
327 return 0x3f << 6;
328}
329static inline u32 therm_grad_stepping_table_slowdown_factor2_f(u32 v)
330{
331 return (v & 0x3f) << 12;
332}
333static inline u32 therm_grad_stepping_table_slowdown_factor2_m(void)
334{
335 return 0x3f << 12;
336}
337static inline u32 therm_grad_stepping_table_slowdown_factor3_f(u32 v)
338{
339 return (v & 0x3f) << 18;
340}
341static inline u32 therm_grad_stepping_table_slowdown_factor3_m(void)
342{
343 return 0x3f << 18;
344}
345static inline u32 therm_grad_stepping_table_slowdown_factor4_f(u32 v)
346{
347 return (v & 0x3f) << 24;
348}
349static inline u32 therm_grad_stepping_table_slowdown_factor4_m(void)
350{
351 return 0x3f << 24;
352}
353static inline u32 therm_grad_stepping0_r(void)
354{
355 return 0x000202c0;
356}
357static inline u32 therm_grad_stepping0_feature_s(void)
358{
359 return 1;
360}
361static inline u32 therm_grad_stepping0_feature_f(u32 v)
362{
363 return (v & 0x1) << 0;
364}
365static inline u32 therm_grad_stepping0_feature_m(void)
366{
367 return 0x1 << 0;
368}
369static inline u32 therm_grad_stepping0_feature_v(u32 r)
370{
371 return (r >> 0) & 0x1;
372}
373static inline u32 therm_grad_stepping0_feature_enable_f(void)
374{
375 return 0x1;
376}
377static inline u32 therm_grad_stepping1_r(void)
378{
379 return 0x000202c4;
380}
381static inline u32 therm_grad_stepping1_pdiv_duration_f(u32 v)
382{
383 return (v & 0x1ffff) << 0;
384}
385static inline u32 therm_clk_timing_r(u32 i)
386{
387 return 0x000203c0 + i*4;
388}
389static inline u32 therm_clk_timing_grad_slowdown_f(u32 v)
390{
391 return (v & 0x1) << 16;
392}
393static inline u32 therm_clk_timing_grad_slowdown_m(void)
394{
395 return 0x1 << 16;
396}
397static inline u32 therm_clk_timing_grad_slowdown_enabled_f(void)
398{
399 return 0x10000;
400}
281#endif 401#endif