summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/include/nvgpu/hw/gp10b/hw_therm_gp10b.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/nvgpu/include/nvgpu/hw/gp10b/hw_therm_gp10b.h')
-rw-r--r--drivers/gpu/nvgpu/include/nvgpu/hw/gp10b/hw_therm_gp10b.h178
1 files changed, 89 insertions, 89 deletions
diff --git a/drivers/gpu/nvgpu/include/nvgpu/hw/gp10b/hw_therm_gp10b.h b/drivers/gpu/nvgpu/include/nvgpu/hw/gp10b/hw_therm_gp10b.h
index 51c926b5..49fb7180 100644
--- a/drivers/gpu/nvgpu/include/nvgpu/hw/gp10b/hw_therm_gp10b.h
+++ b/drivers/gpu/nvgpu/include/nvgpu/hw/gp10b/hw_therm_gp10b.h
@@ -58,358 +58,358 @@
58 58
59static inline u32 therm_use_a_r(void) 59static inline u32 therm_use_a_r(void)
60{ 60{
61 return 0x00020798; 61 return 0x00020798U;
62} 62}
63static inline u32 therm_use_a_ext_therm_0_enable_f(void) 63static inline u32 therm_use_a_ext_therm_0_enable_f(void)
64{ 64{
65 return 0x1; 65 return 0x1U;
66} 66}
67static inline u32 therm_use_a_ext_therm_1_enable_f(void) 67static inline u32 therm_use_a_ext_therm_1_enable_f(void)
68{ 68{
69 return 0x2; 69 return 0x2U;
70} 70}
71static inline u32 therm_use_a_ext_therm_2_enable_f(void) 71static inline u32 therm_use_a_ext_therm_2_enable_f(void)
72{ 72{
73 return 0x4; 73 return 0x4U;
74} 74}
75static inline u32 therm_evt_ext_therm_0_r(void) 75static inline u32 therm_evt_ext_therm_0_r(void)
76{ 76{
77 return 0x00020700; 77 return 0x00020700U;
78} 78}
79static inline u32 therm_evt_ext_therm_0_slow_factor_f(u32 v) 79static inline u32 therm_evt_ext_therm_0_slow_factor_f(u32 v)
80{ 80{
81 return (v & 0x3f) << 24; 81 return (v & 0x3fU) << 24U;
82} 82}
83static inline u32 therm_evt_ext_therm_0_slow_factor_init_v(void) 83static inline u32 therm_evt_ext_therm_0_slow_factor_init_v(void)
84{ 84{
85 return 0x00000001; 85 return 0x00000001U;
86} 86}
87static inline u32 therm_evt_ext_therm_0_mode_f(u32 v) 87static inline u32 therm_evt_ext_therm_0_mode_f(u32 v)
88{ 88{
89 return (v & 0x3) << 30; 89 return (v & 0x3U) << 30U;
90} 90}
91static inline u32 therm_evt_ext_therm_0_mode_normal_v(void) 91static inline u32 therm_evt_ext_therm_0_mode_normal_v(void)
92{ 92{
93 return 0x00000000; 93 return 0x00000000U;
94} 94}
95static inline u32 therm_evt_ext_therm_0_mode_inverted_v(void) 95static inline u32 therm_evt_ext_therm_0_mode_inverted_v(void)
96{ 96{
97 return 0x00000001; 97 return 0x00000001U;
98} 98}
99static inline u32 therm_evt_ext_therm_0_mode_forced_v(void) 99static inline u32 therm_evt_ext_therm_0_mode_forced_v(void)
100{ 100{
101 return 0x00000002; 101 return 0x00000002U;
102} 102}
103static inline u32 therm_evt_ext_therm_0_mode_cleared_v(void) 103static inline u32 therm_evt_ext_therm_0_mode_cleared_v(void)
104{ 104{
105 return 0x00000003; 105 return 0x00000003U;
106} 106}
107static inline u32 therm_evt_ext_therm_1_r(void) 107static inline u32 therm_evt_ext_therm_1_r(void)
108{ 108{
109 return 0x00020704; 109 return 0x00020704U;
110} 110}
111static inline u32 therm_evt_ext_therm_1_slow_factor_f(u32 v) 111static inline u32 therm_evt_ext_therm_1_slow_factor_f(u32 v)
112{ 112{
113 return (v & 0x3f) << 24; 113 return (v & 0x3fU) << 24U;
114} 114}
115static inline u32 therm_evt_ext_therm_1_slow_factor_init_v(void) 115static inline u32 therm_evt_ext_therm_1_slow_factor_init_v(void)
116{ 116{
117 return 0x00000002; 117 return 0x00000002U;
118} 118}
119static inline u32 therm_evt_ext_therm_1_mode_f(u32 v) 119static inline u32 therm_evt_ext_therm_1_mode_f(u32 v)
120{ 120{
121 return (v & 0x3) << 30; 121 return (v & 0x3U) << 30U;
122} 122}
123static inline u32 therm_evt_ext_therm_1_mode_normal_v(void) 123static inline u32 therm_evt_ext_therm_1_mode_normal_v(void)
124{ 124{
125 return 0x00000000; 125 return 0x00000000U;
126} 126}
127static inline u32 therm_evt_ext_therm_1_mode_inverted_v(void) 127static inline u32 therm_evt_ext_therm_1_mode_inverted_v(void)
128{ 128{
129 return 0x00000001; 129 return 0x00000001U;
130} 130}
131static inline u32 therm_evt_ext_therm_1_mode_forced_v(void) 131static inline u32 therm_evt_ext_therm_1_mode_forced_v(void)
132{ 132{
133 return 0x00000002; 133 return 0x00000002U;
134} 134}
135static inline u32 therm_evt_ext_therm_1_mode_cleared_v(void) 135static inline u32 therm_evt_ext_therm_1_mode_cleared_v(void)
136{ 136{
137 return 0x00000003; 137 return 0x00000003U;
138} 138}
139static inline u32 therm_evt_ext_therm_2_r(void) 139static inline u32 therm_evt_ext_therm_2_r(void)
140{ 140{
141 return 0x00020708; 141 return 0x00020708U;
142} 142}
143static inline u32 therm_evt_ext_therm_2_slow_factor_f(u32 v) 143static inline u32 therm_evt_ext_therm_2_slow_factor_f(u32 v)
144{ 144{
145 return (v & 0x3f) << 24; 145 return (v & 0x3fU) << 24U;
146} 146}
147static inline u32 therm_evt_ext_therm_2_slow_factor_init_v(void) 147static inline u32 therm_evt_ext_therm_2_slow_factor_init_v(void)
148{ 148{
149 return 0x00000003; 149 return 0x00000003U;
150} 150}
151static inline u32 therm_evt_ext_therm_2_mode_f(u32 v) 151static inline u32 therm_evt_ext_therm_2_mode_f(u32 v)
152{ 152{
153 return (v & 0x3) << 30; 153 return (v & 0x3U) << 30U;
154} 154}
155static inline u32 therm_evt_ext_therm_2_mode_normal_v(void) 155static inline u32 therm_evt_ext_therm_2_mode_normal_v(void)
156{ 156{
157 return 0x00000000; 157 return 0x00000000U;
158} 158}
159static inline u32 therm_evt_ext_therm_2_mode_inverted_v(void) 159static inline u32 therm_evt_ext_therm_2_mode_inverted_v(void)
160{ 160{
161 return 0x00000001; 161 return 0x00000001U;
162} 162}
163static inline u32 therm_evt_ext_therm_2_mode_forced_v(void) 163static inline u32 therm_evt_ext_therm_2_mode_forced_v(void)
164{ 164{
165 return 0x00000002; 165 return 0x00000002U;
166} 166}
167static inline u32 therm_evt_ext_therm_2_mode_cleared_v(void) 167static inline u32 therm_evt_ext_therm_2_mode_cleared_v(void)
168{ 168{
169 return 0x00000003; 169 return 0x00000003U;
170} 170}
171static inline u32 therm_weight_1_r(void) 171static inline u32 therm_weight_1_r(void)
172{ 172{
173 return 0x00020024; 173 return 0x00020024U;
174} 174}
175static inline u32 therm_config1_r(void) 175static inline u32 therm_config1_r(void)
176{ 176{
177 return 0x00020050; 177 return 0x00020050U;
178} 178}
179static inline u32 therm_config2_r(void) 179static inline u32 therm_config2_r(void)
180{ 180{
181 return 0x00020130; 181 return 0x00020130U;
182} 182}
183static inline u32 therm_config2_slowdown_factor_extended_f(u32 v) 183static inline u32 therm_config2_slowdown_factor_extended_f(u32 v)
184{ 184{
185 return (v & 0x1) << 24; 185 return (v & 0x1U) << 24U;
186} 186}
187static inline u32 therm_config2_grad_enable_f(u32 v) 187static inline u32 therm_config2_grad_enable_f(u32 v)
188{ 188{
189 return (v & 0x1) << 31; 189 return (v & 0x1U) << 31U;
190} 190}
191static inline u32 therm_gate_ctrl_r(u32 i) 191static inline u32 therm_gate_ctrl_r(u32 i)
192{ 192{
193 return 0x00020200 + i*4; 193 return 0x00020200U + i*4U;
194} 194}
195static inline u32 therm_gate_ctrl_eng_clk_m(void) 195static inline u32 therm_gate_ctrl_eng_clk_m(void)
196{ 196{
197 return 0x3 << 0; 197 return 0x3U << 0U;
198} 198}
199static inline u32 therm_gate_ctrl_eng_clk_run_f(void) 199static inline u32 therm_gate_ctrl_eng_clk_run_f(void)
200{ 200{
201 return 0x0; 201 return 0x0U;
202} 202}
203static inline u32 therm_gate_ctrl_eng_clk_auto_f(void) 203static inline u32 therm_gate_ctrl_eng_clk_auto_f(void)
204{ 204{
205 return 0x1; 205 return 0x1U;
206} 206}
207static inline u32 therm_gate_ctrl_eng_clk_stop_f(void) 207static inline u32 therm_gate_ctrl_eng_clk_stop_f(void)
208{ 208{
209 return 0x2; 209 return 0x2U;
210} 210}
211static inline u32 therm_gate_ctrl_blk_clk_m(void) 211static inline u32 therm_gate_ctrl_blk_clk_m(void)
212{ 212{
213 return 0x3 << 2; 213 return 0x3U << 2U;
214} 214}
215static inline u32 therm_gate_ctrl_blk_clk_run_f(void) 215static inline u32 therm_gate_ctrl_blk_clk_run_f(void)
216{ 216{
217 return 0x0; 217 return 0x0U;
218} 218}
219static inline u32 therm_gate_ctrl_blk_clk_auto_f(void) 219static inline u32 therm_gate_ctrl_blk_clk_auto_f(void)
220{ 220{
221 return 0x4; 221 return 0x4U;
222} 222}
223static inline u32 therm_gate_ctrl_eng_pwr_m(void) 223static inline u32 therm_gate_ctrl_eng_pwr_m(void)
224{ 224{
225 return 0x3 << 4; 225 return 0x3U << 4U;
226} 226}
227static inline u32 therm_gate_ctrl_eng_pwr_auto_f(void) 227static inline u32 therm_gate_ctrl_eng_pwr_auto_f(void)
228{ 228{
229 return 0x10; 229 return 0x10U;
230} 230}
231static inline u32 therm_gate_ctrl_eng_pwr_off_v(void) 231static inline u32 therm_gate_ctrl_eng_pwr_off_v(void)
232{ 232{
233 return 0x00000002; 233 return 0x00000002U;
234} 234}
235static inline u32 therm_gate_ctrl_eng_pwr_off_f(void) 235static inline u32 therm_gate_ctrl_eng_pwr_off_f(void)
236{ 236{
237 return 0x20; 237 return 0x20U;
238} 238}
239static inline u32 therm_gate_ctrl_eng_idle_filt_exp_f(u32 v) 239static inline u32 therm_gate_ctrl_eng_idle_filt_exp_f(u32 v)
240{ 240{
241 return (v & 0x1f) << 8; 241 return (v & 0x1fU) << 8U;
242} 242}
243static inline u32 therm_gate_ctrl_eng_idle_filt_exp_m(void) 243static inline u32 therm_gate_ctrl_eng_idle_filt_exp_m(void)
244{ 244{
245 return 0x1f << 8; 245 return 0x1fU << 8U;
246} 246}
247static inline u32 therm_gate_ctrl_eng_idle_filt_mant_f(u32 v) 247static inline u32 therm_gate_ctrl_eng_idle_filt_mant_f(u32 v)
248{ 248{
249 return (v & 0x7) << 13; 249 return (v & 0x7U) << 13U;
250} 250}
251static inline u32 therm_gate_ctrl_eng_idle_filt_mant_m(void) 251static inline u32 therm_gate_ctrl_eng_idle_filt_mant_m(void)
252{ 252{
253 return 0x7 << 13; 253 return 0x7U << 13U;
254} 254}
255static inline u32 therm_gate_ctrl_eng_delay_before_f(u32 v) 255static inline u32 therm_gate_ctrl_eng_delay_before_f(u32 v)
256{ 256{
257 return (v & 0xf) << 16; 257 return (v & 0xfU) << 16U;
258} 258}
259static inline u32 therm_gate_ctrl_eng_delay_before_m(void) 259static inline u32 therm_gate_ctrl_eng_delay_before_m(void)
260{ 260{
261 return 0xf << 16; 261 return 0xfU << 16U;
262} 262}
263static inline u32 therm_gate_ctrl_eng_delay_after_f(u32 v) 263static inline u32 therm_gate_ctrl_eng_delay_after_f(u32 v)
264{ 264{
265 return (v & 0xf) << 20; 265 return (v & 0xfU) << 20U;
266} 266}
267static inline u32 therm_gate_ctrl_eng_delay_after_m(void) 267static inline u32 therm_gate_ctrl_eng_delay_after_m(void)
268{ 268{
269 return 0xf << 20; 269 return 0xfU << 20U;
270} 270}
271static inline u32 therm_fecs_idle_filter_r(void) 271static inline u32 therm_fecs_idle_filter_r(void)
272{ 272{
273 return 0x00020288; 273 return 0x00020288U;
274} 274}
275static inline u32 therm_fecs_idle_filter_value_m(void) 275static inline u32 therm_fecs_idle_filter_value_m(void)
276{ 276{
277 return 0xffffffff << 0; 277 return 0xffffffffU << 0U;
278} 278}
279static inline u32 therm_hubmmu_idle_filter_r(void) 279static inline u32 therm_hubmmu_idle_filter_r(void)
280{ 280{
281 return 0x0002028c; 281 return 0x0002028cU;
282} 282}
283static inline u32 therm_hubmmu_idle_filter_value_m(void) 283static inline u32 therm_hubmmu_idle_filter_value_m(void)
284{ 284{
285 return 0xffffffff << 0; 285 return 0xffffffffU << 0U;
286} 286}
287static inline u32 therm_clk_slowdown_r(u32 i) 287static inline u32 therm_clk_slowdown_r(u32 i)
288{ 288{
289 return 0x00020160 + i*4; 289 return 0x00020160U + i*4U;
290} 290}
291static inline u32 therm_clk_slowdown_idle_factor_f(u32 v) 291static inline u32 therm_clk_slowdown_idle_factor_f(u32 v)
292{ 292{
293 return (v & 0x3f) << 16; 293 return (v & 0x3fU) << 16U;
294} 294}
295static inline u32 therm_clk_slowdown_idle_factor_m(void) 295static inline u32 therm_clk_slowdown_idle_factor_m(void)
296{ 296{
297 return 0x3f << 16; 297 return 0x3fU << 16U;
298} 298}
299static inline u32 therm_clk_slowdown_idle_factor_v(u32 r) 299static inline u32 therm_clk_slowdown_idle_factor_v(u32 r)
300{ 300{
301 return (r >> 16) & 0x3f; 301 return (r >> 16U) & 0x3fU;
302} 302}
303static inline u32 therm_clk_slowdown_idle_factor_disabled_f(void) 303static inline u32 therm_clk_slowdown_idle_factor_disabled_f(void)
304{ 304{
305 return 0x0; 305 return 0x0U;
306} 306}
307static inline u32 therm_grad_stepping_table_r(u32 i) 307static inline u32 therm_grad_stepping_table_r(u32 i)
308{ 308{
309 return 0x000202c8 + i*4; 309 return 0x000202c8U + i*4U;
310} 310}
311static inline u32 therm_grad_stepping_table_slowdown_factor0_f(u32 v) 311static inline u32 therm_grad_stepping_table_slowdown_factor0_f(u32 v)
312{ 312{
313 return (v & 0x3f) << 0; 313 return (v & 0x3fU) << 0U;
314} 314}
315static inline u32 therm_grad_stepping_table_slowdown_factor0_m(void) 315static inline u32 therm_grad_stepping_table_slowdown_factor0_m(void)
316{ 316{
317 return 0x3f << 0; 317 return 0x3fU << 0U;
318} 318}
319static inline u32 therm_grad_stepping_table_slowdown_factor0_fpdiv_by1p5_f(void) 319static inline u32 therm_grad_stepping_table_slowdown_factor0_fpdiv_by1p5_f(void)
320{ 320{
321 return 0x1; 321 return 0x1U;
322} 322}
323static inline u32 therm_grad_stepping_table_slowdown_factor0_fpdiv_by2_f(void) 323static inline u32 therm_grad_stepping_table_slowdown_factor0_fpdiv_by2_f(void)
324{ 324{
325 return 0x2; 325 return 0x2U;
326} 326}
327static inline u32 therm_grad_stepping_table_slowdown_factor0_fpdiv_by4_f(void) 327static inline u32 therm_grad_stepping_table_slowdown_factor0_fpdiv_by4_f(void)
328{ 328{
329 return 0x6; 329 return 0x6U;
330} 330}
331static inline u32 therm_grad_stepping_table_slowdown_factor0_fpdiv_by8_f(void) 331static inline u32 therm_grad_stepping_table_slowdown_factor0_fpdiv_by8_f(void)
332{ 332{
333 return 0xe; 333 return 0xeU;
334} 334}
335static inline u32 therm_grad_stepping_table_slowdown_factor1_f(u32 v) 335static inline u32 therm_grad_stepping_table_slowdown_factor1_f(u32 v)
336{ 336{
337 return (v & 0x3f) << 6; 337 return (v & 0x3fU) << 6U;
338} 338}
339static inline u32 therm_grad_stepping_table_slowdown_factor1_m(void) 339static inline u32 therm_grad_stepping_table_slowdown_factor1_m(void)
340{ 340{
341 return 0x3f << 6; 341 return 0x3fU << 6U;
342} 342}
343static inline u32 therm_grad_stepping_table_slowdown_factor2_f(u32 v) 343static inline u32 therm_grad_stepping_table_slowdown_factor2_f(u32 v)
344{ 344{
345 return (v & 0x3f) << 12; 345 return (v & 0x3fU) << 12U;
346} 346}
347static inline u32 therm_grad_stepping_table_slowdown_factor2_m(void) 347static inline u32 therm_grad_stepping_table_slowdown_factor2_m(void)
348{ 348{
349 return 0x3f << 12; 349 return 0x3fU << 12U;
350} 350}
351static inline u32 therm_grad_stepping_table_slowdown_factor3_f(u32 v) 351static inline u32 therm_grad_stepping_table_slowdown_factor3_f(u32 v)
352{ 352{
353 return (v & 0x3f) << 18; 353 return (v & 0x3fU) << 18U;
354} 354}
355static inline u32 therm_grad_stepping_table_slowdown_factor3_m(void) 355static inline u32 therm_grad_stepping_table_slowdown_factor3_m(void)
356{ 356{
357 return 0x3f << 18; 357 return 0x3fU << 18U;
358} 358}
359static inline u32 therm_grad_stepping_table_slowdown_factor4_f(u32 v) 359static inline u32 therm_grad_stepping_table_slowdown_factor4_f(u32 v)
360{ 360{
361 return (v & 0x3f) << 24; 361 return (v & 0x3fU) << 24U;
362} 362}
363static inline u32 therm_grad_stepping_table_slowdown_factor4_m(void) 363static inline u32 therm_grad_stepping_table_slowdown_factor4_m(void)
364{ 364{
365 return 0x3f << 24; 365 return 0x3fU << 24U;
366} 366}
367static inline u32 therm_grad_stepping0_r(void) 367static inline u32 therm_grad_stepping0_r(void)
368{ 368{
369 return 0x000202c0; 369 return 0x000202c0U;
370} 370}
371static inline u32 therm_grad_stepping0_feature_s(void) 371static inline u32 therm_grad_stepping0_feature_s(void)
372{ 372{
373 return 1; 373 return 1U;
374} 374}
375static inline u32 therm_grad_stepping0_feature_f(u32 v) 375static inline u32 therm_grad_stepping0_feature_f(u32 v)
376{ 376{
377 return (v & 0x1) << 0; 377 return (v & 0x1U) << 0U;
378} 378}
379static inline u32 therm_grad_stepping0_feature_m(void) 379static inline u32 therm_grad_stepping0_feature_m(void)
380{ 380{
381 return 0x1 << 0; 381 return 0x1U << 0U;
382} 382}
383static inline u32 therm_grad_stepping0_feature_v(u32 r) 383static inline u32 therm_grad_stepping0_feature_v(u32 r)
384{ 384{
385 return (r >> 0) & 0x1; 385 return (r >> 0U) & 0x1U;
386} 386}
387static inline u32 therm_grad_stepping0_feature_enable_f(void) 387static inline u32 therm_grad_stepping0_feature_enable_f(void)
388{ 388{
389 return 0x1; 389 return 0x1U;
390} 390}
391static inline u32 therm_grad_stepping1_r(void) 391static inline u32 therm_grad_stepping1_r(void)
392{ 392{
393 return 0x000202c4; 393 return 0x000202c4U;
394} 394}
395static inline u32 therm_grad_stepping1_pdiv_duration_f(u32 v) 395static inline u32 therm_grad_stepping1_pdiv_duration_f(u32 v)
396{ 396{
397 return (v & 0x1ffff) << 0; 397 return (v & 0x1ffffU) << 0U;
398} 398}
399static inline u32 therm_clk_timing_r(u32 i) 399static inline u32 therm_clk_timing_r(u32 i)
400{ 400{
401 return 0x000203c0 + i*4; 401 return 0x000203c0U + i*4U;
402} 402}
403static inline u32 therm_clk_timing_grad_slowdown_f(u32 v) 403static inline u32 therm_clk_timing_grad_slowdown_f(u32 v)
404{ 404{
405 return (v & 0x1) << 16; 405 return (v & 0x1U) << 16U;
406} 406}
407static inline u32 therm_clk_timing_grad_slowdown_m(void) 407static inline u32 therm_clk_timing_grad_slowdown_m(void)
408{ 408{
409 return 0x1 << 16; 409 return 0x1U << 16U;
410} 410}
411static inline u32 therm_clk_timing_grad_slowdown_enabled_f(void) 411static inline u32 therm_clk_timing_grad_slowdown_enabled_f(void)
412{ 412{
413 return 0x10000; 413 return 0x10000U;
414} 414}
415#endif 415#endif