diff options
Diffstat (limited to 'drivers/gpu/nvgpu/gm20b/hw_therm_gm20b.h')
-rw-r--r-- | drivers/gpu/nvgpu/gm20b/hw_therm_gm20b.h | 349 |
1 files changed, 0 insertions, 349 deletions
diff --git a/drivers/gpu/nvgpu/gm20b/hw_therm_gm20b.h b/drivers/gpu/nvgpu/gm20b/hw_therm_gm20b.h deleted file mode 100644 index e8a5b6a5..00000000 --- a/drivers/gpu/nvgpu/gm20b/hw_therm_gm20b.h +++ /dev/null | |||
@@ -1,349 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (c) 2014-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_therm_gm20b_h_ | ||
51 | #define _hw_therm_gm20b_h_ | ||
52 | |||
53 | static inline u32 therm_use_a_r(void) | ||
54 | { | ||
55 | return 0x00020798; | ||
56 | } | ||
57 | static inline u32 therm_use_a_ext_therm_0_enable_f(void) | ||
58 | { | ||
59 | return 0x1; | ||
60 | } | ||
61 | static inline u32 therm_use_a_ext_therm_1_enable_f(void) | ||
62 | { | ||
63 | return 0x2; | ||
64 | } | ||
65 | static inline u32 therm_use_a_ext_therm_2_enable_f(void) | ||
66 | { | ||
67 | return 0x4; | ||
68 | } | ||
69 | static inline u32 therm_evt_ext_therm_0_r(void) | ||
70 | { | ||
71 | return 0x00020700; | ||
72 | } | ||
73 | static inline u32 therm_evt_ext_therm_0_slow_factor_f(u32 v) | ||
74 | { | ||
75 | return (v & 0x3f) << 8; | ||
76 | } | ||
77 | static inline u32 therm_evt_ext_therm_0_slow_factor_init_v(void) | ||
78 | { | ||
79 | return 0x00000000; | ||
80 | } | ||
81 | static inline u32 therm_evt_ext_therm_1_r(void) | ||
82 | { | ||
83 | return 0x00020704; | ||
84 | } | ||
85 | static inline u32 therm_evt_ext_therm_1_slow_factor_f(u32 v) | ||
86 | { | ||
87 | return (v & 0x3f) << 8; | ||
88 | } | ||
89 | static inline u32 therm_evt_ext_therm_1_slow_factor_init_v(void) | ||
90 | { | ||
91 | return 0x00000000; | ||
92 | } | ||
93 | static inline u32 therm_evt_ext_therm_2_r(void) | ||
94 | { | ||
95 | return 0x00020708; | ||
96 | } | ||
97 | static inline u32 therm_evt_ext_therm_2_slow_factor_f(u32 v) | ||
98 | { | ||
99 | return (v & 0x3f) << 8; | ||
100 | } | ||
101 | static inline u32 therm_evt_ext_therm_2_slow_factor_init_v(void) | ||
102 | { | ||
103 | return 0x00000000; | ||
104 | } | ||
105 | static inline u32 therm_weight_1_r(void) | ||
106 | { | ||
107 | return 0x00020024; | ||
108 | } | ||
109 | static inline u32 therm_config1_r(void) | ||
110 | { | ||
111 | return 0x00020050; | ||
112 | } | ||
113 | static inline u32 therm_config2_r(void) | ||
114 | { | ||
115 | return 0x00020130; | ||
116 | } | ||
117 | static inline u32 therm_config2_slowdown_factor_extended_f(u32 v) | ||
118 | { | ||
119 | return (v & 0x1) << 24; | ||
120 | } | ||
121 | static inline u32 therm_config2_grad_enable_f(u32 v) | ||
122 | { | ||
123 | return (v & 0x1) << 31; | ||
124 | } | ||
125 | static inline u32 therm_gate_ctrl_r(u32 i) | ||
126 | { | ||
127 | return 0x00020200 + i*4; | ||
128 | } | ||
129 | static inline u32 therm_gate_ctrl_eng_clk_m(void) | ||
130 | { | ||
131 | return 0x3 << 0; | ||
132 | } | ||
133 | static inline u32 therm_gate_ctrl_eng_clk_run_f(void) | ||
134 | { | ||
135 | return 0x0; | ||
136 | } | ||
137 | static inline u32 therm_gate_ctrl_eng_clk_auto_f(void) | ||
138 | { | ||
139 | return 0x1; | ||
140 | } | ||
141 | static inline u32 therm_gate_ctrl_eng_clk_stop_f(void) | ||
142 | { | ||
143 | return 0x2; | ||
144 | } | ||
145 | static inline u32 therm_gate_ctrl_blk_clk_m(void) | ||
146 | { | ||
147 | return 0x3 << 2; | ||
148 | } | ||
149 | static inline u32 therm_gate_ctrl_blk_clk_run_f(void) | ||
150 | { | ||
151 | return 0x0; | ||
152 | } | ||
153 | static inline u32 therm_gate_ctrl_blk_clk_auto_f(void) | ||
154 | { | ||
155 | return 0x4; | ||
156 | } | ||
157 | static inline u32 therm_gate_ctrl_eng_pwr_m(void) | ||
158 | { | ||
159 | return 0x3 << 4; | ||
160 | } | ||
161 | static inline u32 therm_gate_ctrl_eng_pwr_auto_f(void) | ||
162 | { | ||
163 | return 0x10; | ||
164 | } | ||
165 | static inline u32 therm_gate_ctrl_eng_pwr_off_v(void) | ||
166 | { | ||
167 | return 0x00000002; | ||
168 | } | ||
169 | static inline u32 therm_gate_ctrl_eng_pwr_off_f(void) | ||
170 | { | ||
171 | return 0x20; | ||
172 | } | ||
173 | static inline u32 therm_gate_ctrl_eng_idle_filt_exp_f(u32 v) | ||
174 | { | ||
175 | return (v & 0x1f) << 8; | ||
176 | } | ||
177 | static inline u32 therm_gate_ctrl_eng_idle_filt_exp_m(void) | ||
178 | { | ||
179 | return 0x1f << 8; | ||
180 | } | ||
181 | static inline u32 therm_gate_ctrl_eng_idle_filt_mant_f(u32 v) | ||
182 | { | ||
183 | return (v & 0x7) << 13; | ||
184 | } | ||
185 | static inline u32 therm_gate_ctrl_eng_idle_filt_mant_m(void) | ||
186 | { | ||
187 | return 0x7 << 13; | ||
188 | } | ||
189 | static inline u32 therm_gate_ctrl_eng_delay_before_f(u32 v) | ||
190 | { | ||
191 | return (v & 0xf) << 16; | ||
192 | } | ||
193 | static inline u32 therm_gate_ctrl_eng_delay_before_m(void) | ||
194 | { | ||
195 | return 0xf << 16; | ||
196 | } | ||
197 | static inline u32 therm_gate_ctrl_eng_delay_after_f(u32 v) | ||
198 | { | ||
199 | return (v & 0xf) << 20; | ||
200 | } | ||
201 | static inline u32 therm_gate_ctrl_eng_delay_after_m(void) | ||
202 | { | ||
203 | return 0xf << 20; | ||
204 | } | ||
205 | static inline u32 therm_fecs_idle_filter_r(void) | ||
206 | { | ||
207 | return 0x00020288; | ||
208 | } | ||
209 | static inline u32 therm_fecs_idle_filter_value_m(void) | ||
210 | { | ||
211 | return 0xffffffff << 0; | ||
212 | } | ||
213 | static inline u32 therm_hubmmu_idle_filter_r(void) | ||
214 | { | ||
215 | return 0x0002028c; | ||
216 | } | ||
217 | static inline u32 therm_hubmmu_idle_filter_value_m(void) | ||
218 | { | ||
219 | return 0xffffffff << 0; | ||
220 | } | ||
221 | static inline u32 therm_clk_slowdown_r(u32 i) | ||
222 | { | ||
223 | return 0x00020160 + i*4; | ||
224 | } | ||
225 | static inline u32 therm_clk_slowdown_idle_factor_f(u32 v) | ||
226 | { | ||
227 | return (v & 0x3f) << 16; | ||
228 | } | ||
229 | static inline u32 therm_clk_slowdown_idle_factor_m(void) | ||
230 | { | ||
231 | return 0x3f << 16; | ||
232 | } | ||
233 | static inline u32 therm_clk_slowdown_idle_factor_v(u32 r) | ||
234 | { | ||
235 | return (r >> 16) & 0x3f; | ||
236 | } | ||
237 | static inline u32 therm_clk_slowdown_idle_factor_disabled_f(void) | ||
238 | { | ||
239 | return 0x0; | ||
240 | } | ||
241 | static inline u32 therm_grad_stepping_table_r(u32 i) | ||
242 | { | ||
243 | return 0x000202c8 + i*4; | ||
244 | } | ||
245 | static inline u32 therm_grad_stepping_table_slowdown_factor0_f(u32 v) | ||
246 | { | ||
247 | return (v & 0x3f) << 0; | ||
248 | } | ||
249 | static inline u32 therm_grad_stepping_table_slowdown_factor0_m(void) | ||
250 | { | ||
251 | return 0x3f << 0; | ||
252 | } | ||
253 | static inline u32 therm_grad_stepping_table_slowdown_factor0_fpdiv_by1p5_f(void) | ||
254 | { | ||
255 | return 0x1; | ||
256 | } | ||
257 | static inline u32 therm_grad_stepping_table_slowdown_factor0_fpdiv_by2_f(void) | ||
258 | { | ||
259 | return 0x2; | ||
260 | } | ||
261 | static inline u32 therm_grad_stepping_table_slowdown_factor0_fpdiv_by4_f(void) | ||
262 | { | ||
263 | return 0x6; | ||
264 | } | ||
265 | static inline u32 therm_grad_stepping_table_slowdown_factor0_fpdiv_by8_f(void) | ||
266 | { | ||
267 | return 0xe; | ||
268 | } | ||
269 | static inline u32 therm_grad_stepping_table_slowdown_factor1_f(u32 v) | ||
270 | { | ||
271 | return (v & 0x3f) << 6; | ||
272 | } | ||
273 | static inline u32 therm_grad_stepping_table_slowdown_factor1_m(void) | ||
274 | { | ||
275 | return 0x3f << 6; | ||
276 | } | ||
277 | static inline u32 therm_grad_stepping_table_slowdown_factor2_f(u32 v) | ||
278 | { | ||
279 | return (v & 0x3f) << 12; | ||
280 | } | ||
281 | static inline u32 therm_grad_stepping_table_slowdown_factor2_m(void) | ||
282 | { | ||
283 | return 0x3f << 12; | ||
284 | } | ||
285 | static inline u32 therm_grad_stepping_table_slowdown_factor3_f(u32 v) | ||
286 | { | ||
287 | return (v & 0x3f) << 18; | ||
288 | } | ||
289 | static inline u32 therm_grad_stepping_table_slowdown_factor3_m(void) | ||
290 | { | ||
291 | return 0x3f << 18; | ||
292 | } | ||
293 | static inline u32 therm_grad_stepping_table_slowdown_factor4_f(u32 v) | ||
294 | { | ||
295 | return (v & 0x3f) << 24; | ||
296 | } | ||
297 | static inline u32 therm_grad_stepping_table_slowdown_factor4_m(void) | ||
298 | { | ||
299 | return 0x3f << 24; | ||
300 | } | ||
301 | static inline u32 therm_grad_stepping0_r(void) | ||
302 | { | ||
303 | return 0x000202c0; | ||
304 | } | ||
305 | static inline u32 therm_grad_stepping0_feature_s(void) | ||
306 | { | ||
307 | return 1; | ||
308 | } | ||
309 | static inline u32 therm_grad_stepping0_feature_f(u32 v) | ||
310 | { | ||
311 | return (v & 0x1) << 0; | ||
312 | } | ||
313 | static inline u32 therm_grad_stepping0_feature_m(void) | ||
314 | { | ||
315 | return 0x1 << 0; | ||
316 | } | ||
317 | static inline u32 therm_grad_stepping0_feature_v(u32 r) | ||
318 | { | ||
319 | return (r >> 0) & 0x1; | ||
320 | } | ||
321 | static inline u32 therm_grad_stepping0_feature_enable_f(void) | ||
322 | { | ||
323 | return 0x1; | ||
324 | } | ||
325 | static inline u32 therm_grad_stepping1_r(void) | ||
326 | { | ||
327 | return 0x000202c4; | ||
328 | } | ||
329 | static inline u32 therm_grad_stepping1_pdiv_duration_f(u32 v) | ||
330 | { | ||
331 | return (v & 0x1ffff) << 0; | ||
332 | } | ||
333 | static inline u32 therm_clk_timing_r(u32 i) | ||
334 | { | ||
335 | return 0x000203c0 + i*4; | ||
336 | } | ||
337 | static inline u32 therm_clk_timing_grad_slowdown_f(u32 v) | ||
338 | { | ||
339 | return (v & 0x1) << 16; | ||
340 | } | ||
341 | static inline u32 therm_clk_timing_grad_slowdown_m(void) | ||
342 | { | ||
343 | return 0x1 << 16; | ||
344 | } | ||
345 | static inline u32 therm_clk_timing_grad_slowdown_enabled_f(void) | ||
346 | { | ||
347 | return 0x10000; | ||
348 | } | ||
349 | #endif | ||