diff options
author | Terje Bergstrom <tbergstrom@nvidia.com> | 2017-09-29 15:41:48 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2017-10-12 00:08:15 -0400 |
commit | 82f235b5299c65446398d63fd3c982853fc1de23 (patch) | |
tree | b157e920b38ae1f18f09b59fd5ffff1e621d9770 /drivers/gpu/nvgpu/include/nvgpu/hw/gv100/hw_therm_gv100.h | |
parent | ade9f5e03f1d0fd4987fc3f9fafb12e4118ac570 (diff) |
gpu: nvgpu: gv100: Qualify unsigned HW constants
Re-generate hardware headers so that all unsigned constants are
qualified with postfix U. This removes the need for compiler to do
implicit signed->unsigned conversions.
Change-Id: If3c1e25dcb07ce6857a4798f2c5308e2948fe5e0
Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1571163
Reviewed-by: Seshendra Gadagottu <sgadagottu@nvidia.com>
GVS: Gerrit_Virtual_Submit
Diffstat (limited to 'drivers/gpu/nvgpu/include/nvgpu/hw/gv100/hw_therm_gv100.h')
-rw-r--r-- | drivers/gpu/nvgpu/include/nvgpu/hw/gv100/hw_therm_gv100.h | 120 |
1 files changed, 60 insertions, 60 deletions
diff --git a/drivers/gpu/nvgpu/include/nvgpu/hw/gv100/hw_therm_gv100.h b/drivers/gpu/nvgpu/include/nvgpu/hw/gv100/hw_therm_gv100.h index 2834acf8..2ea71ef1 100644 --- a/drivers/gpu/nvgpu/include/nvgpu/hw/gv100/hw_therm_gv100.h +++ b/drivers/gpu/nvgpu/include/nvgpu/hw/gv100/hw_therm_gv100.h | |||
@@ -58,242 +58,242 @@ | |||
58 | 58 | ||
59 | static inline u32 therm_weight_1_r(void) | 59 | static inline u32 therm_weight_1_r(void) |
60 | { | 60 | { |
61 | return 0x00020024; | 61 | return 0x00020024U; |
62 | } | 62 | } |
63 | static inline u32 therm_config1_r(void) | 63 | static inline u32 therm_config1_r(void) |
64 | { | 64 | { |
65 | return 0x00020050; | 65 | return 0x00020050U; |
66 | } | 66 | } |
67 | static inline u32 therm_config2_r(void) | 67 | static inline u32 therm_config2_r(void) |
68 | { | 68 | { |
69 | return 0x00020130; | 69 | return 0x00020130U; |
70 | } | 70 | } |
71 | static inline u32 therm_config2_slowdown_factor_extended_f(u32 v) | 71 | static inline u32 therm_config2_slowdown_factor_extended_f(u32 v) |
72 | { | 72 | { |
73 | return (v & 0x1) << 24; | 73 | return (v & 0x1U) << 24U; |
74 | } | 74 | } |
75 | static inline u32 therm_config2_grad_enable_f(u32 v) | 75 | static inline u32 therm_config2_grad_enable_f(u32 v) |
76 | { | 76 | { |
77 | return (v & 0x1) << 31; | 77 | return (v & 0x1U) << 31U; |
78 | } | 78 | } |
79 | static inline u32 therm_gate_ctrl_r(u32 i) | 79 | static inline u32 therm_gate_ctrl_r(u32 i) |
80 | { | 80 | { |
81 | return 0x00020200 + i*4; | 81 | return 0x00020200U + i*4U; |
82 | } | 82 | } |
83 | static inline u32 therm_gate_ctrl_eng_clk_m(void) | 83 | static inline u32 therm_gate_ctrl_eng_clk_m(void) |
84 | { | 84 | { |
85 | return 0x3 << 0; | 85 | return 0x3U << 0U; |
86 | } | 86 | } |
87 | static inline u32 therm_gate_ctrl_eng_clk_run_f(void) | 87 | static inline u32 therm_gate_ctrl_eng_clk_run_f(void) |
88 | { | 88 | { |
89 | return 0x0; | 89 | return 0x0U; |
90 | } | 90 | } |
91 | static inline u32 therm_gate_ctrl_eng_clk_auto_f(void) | 91 | static inline u32 therm_gate_ctrl_eng_clk_auto_f(void) |
92 | { | 92 | { |
93 | return 0x1; | 93 | return 0x1U; |
94 | } | 94 | } |
95 | static inline u32 therm_gate_ctrl_eng_clk_stop_f(void) | 95 | static inline u32 therm_gate_ctrl_eng_clk_stop_f(void) |
96 | { | 96 | { |
97 | return 0x2; | 97 | return 0x2U; |
98 | } | 98 | } |
99 | static inline u32 therm_gate_ctrl_blk_clk_m(void) | 99 | static inline u32 therm_gate_ctrl_blk_clk_m(void) |
100 | { | 100 | { |
101 | return 0x3 << 2; | 101 | return 0x3U << 2U; |
102 | } | 102 | } |
103 | static inline u32 therm_gate_ctrl_blk_clk_run_f(void) | 103 | static inline u32 therm_gate_ctrl_blk_clk_run_f(void) |
104 | { | 104 | { |
105 | return 0x0; | 105 | return 0x0U; |
106 | } | 106 | } |
107 | static inline u32 therm_gate_ctrl_blk_clk_auto_f(void) | 107 | static inline u32 therm_gate_ctrl_blk_clk_auto_f(void) |
108 | { | 108 | { |
109 | return 0x4; | 109 | return 0x4U; |
110 | } | 110 | } |
111 | static inline u32 therm_gate_ctrl_idle_holdoff_m(void) | 111 | static inline u32 therm_gate_ctrl_idle_holdoff_m(void) |
112 | { | 112 | { |
113 | return 0x1 << 4; | 113 | return 0x1U << 4U; |
114 | } | 114 | } |
115 | static inline u32 therm_gate_ctrl_idle_holdoff_off_f(void) | 115 | static inline u32 therm_gate_ctrl_idle_holdoff_off_f(void) |
116 | { | 116 | { |
117 | return 0x0; | 117 | return 0x0U; |
118 | } | 118 | } |
119 | static inline u32 therm_gate_ctrl_idle_holdoff_on_f(void) | 119 | static inline u32 therm_gate_ctrl_idle_holdoff_on_f(void) |
120 | { | 120 | { |
121 | return 0x10; | 121 | return 0x10U; |
122 | } | 122 | } |
123 | static inline u32 therm_gate_ctrl_eng_idle_filt_exp_f(u32 v) | 123 | static inline u32 therm_gate_ctrl_eng_idle_filt_exp_f(u32 v) |
124 | { | 124 | { |
125 | return (v & 0x1f) << 8; | 125 | return (v & 0x1fU) << 8U; |
126 | } | 126 | } |
127 | static inline u32 therm_gate_ctrl_eng_idle_filt_exp_m(void) | 127 | static inline u32 therm_gate_ctrl_eng_idle_filt_exp_m(void) |
128 | { | 128 | { |
129 | return 0x1f << 8; | 129 | return 0x1fU << 8U; |
130 | } | 130 | } |
131 | static inline u32 therm_gate_ctrl_eng_idle_filt_mant_f(u32 v) | 131 | static inline u32 therm_gate_ctrl_eng_idle_filt_mant_f(u32 v) |
132 | { | 132 | { |
133 | return (v & 0x7) << 13; | 133 | return (v & 0x7U) << 13U; |
134 | } | 134 | } |
135 | static inline u32 therm_gate_ctrl_eng_idle_filt_mant_m(void) | 135 | static inline u32 therm_gate_ctrl_eng_idle_filt_mant_m(void) |
136 | { | 136 | { |
137 | return 0x7 << 13; | 137 | return 0x7U << 13U; |
138 | } | 138 | } |
139 | static inline u32 therm_gate_ctrl_eng_delay_before_f(u32 v) | 139 | static inline u32 therm_gate_ctrl_eng_delay_before_f(u32 v) |
140 | { | 140 | { |
141 | return (v & 0xf) << 16; | 141 | return (v & 0xfU) << 16U; |
142 | } | 142 | } |
143 | static inline u32 therm_gate_ctrl_eng_delay_before_m(void) | 143 | static inline u32 therm_gate_ctrl_eng_delay_before_m(void) |
144 | { | 144 | { |
145 | return 0xf << 16; | 145 | return 0xfU << 16U; |
146 | } | 146 | } |
147 | static inline u32 therm_gate_ctrl_eng_delay_after_f(u32 v) | 147 | static inline u32 therm_gate_ctrl_eng_delay_after_f(u32 v) |
148 | { | 148 | { |
149 | return (v & 0xf) << 20; | 149 | return (v & 0xfU) << 20U; |
150 | } | 150 | } |
151 | static inline u32 therm_gate_ctrl_eng_delay_after_m(void) | 151 | static inline u32 therm_gate_ctrl_eng_delay_after_m(void) |
152 | { | 152 | { |
153 | return 0xf << 20; | 153 | return 0xfU << 20U; |
154 | } | 154 | } |
155 | static inline u32 therm_fecs_idle_filter_r(void) | 155 | static inline u32 therm_fecs_idle_filter_r(void) |
156 | { | 156 | { |
157 | return 0x00020288; | 157 | return 0x00020288U; |
158 | } | 158 | } |
159 | static inline u32 therm_fecs_idle_filter_value_m(void) | 159 | static inline u32 therm_fecs_idle_filter_value_m(void) |
160 | { | 160 | { |
161 | return 0xffffffff << 0; | 161 | return 0xffffffffU << 0U; |
162 | } | 162 | } |
163 | static inline u32 therm_hubmmu_idle_filter_r(void) | 163 | static inline u32 therm_hubmmu_idle_filter_r(void) |
164 | { | 164 | { |
165 | return 0x0002028c; | 165 | return 0x0002028cU; |
166 | } | 166 | } |
167 | static inline u32 therm_hubmmu_idle_filter_value_m(void) | 167 | static inline u32 therm_hubmmu_idle_filter_value_m(void) |
168 | { | 168 | { |
169 | return 0xffffffff << 0; | 169 | return 0xffffffffU << 0U; |
170 | } | 170 | } |
171 | static inline u32 therm_clk_slowdown_r(u32 i) | 171 | static inline u32 therm_clk_slowdown_r(u32 i) |
172 | { | 172 | { |
173 | return 0x00020160 + i*4; | 173 | return 0x00020160U + i*4U; |
174 | } | 174 | } |
175 | static inline u32 therm_clk_slowdown_idle_factor_f(u32 v) | 175 | static inline u32 therm_clk_slowdown_idle_factor_f(u32 v) |
176 | { | 176 | { |
177 | return (v & 0x3f) << 16; | 177 | return (v & 0x3fU) << 16U; |
178 | } | 178 | } |
179 | static inline u32 therm_clk_slowdown_idle_factor_m(void) | 179 | static inline u32 therm_clk_slowdown_idle_factor_m(void) |
180 | { | 180 | { |
181 | return 0x3f << 16; | 181 | return 0x3fU << 16U; |
182 | } | 182 | } |
183 | static inline u32 therm_clk_slowdown_idle_factor_v(u32 r) | 183 | static inline u32 therm_clk_slowdown_idle_factor_v(u32 r) |
184 | { | 184 | { |
185 | return (r >> 16) & 0x3f; | 185 | return (r >> 16U) & 0x3fU; |
186 | } | 186 | } |
187 | static inline u32 therm_clk_slowdown_idle_factor_disabled_f(void) | 187 | static inline u32 therm_clk_slowdown_idle_factor_disabled_f(void) |
188 | { | 188 | { |
189 | return 0x0; | 189 | return 0x0U; |
190 | } | 190 | } |
191 | static inline u32 therm_grad_stepping_table_r(u32 i) | 191 | static inline u32 therm_grad_stepping_table_r(u32 i) |
192 | { | 192 | { |
193 | return 0x000202c8 + i*4; | 193 | return 0x000202c8U + i*4U; |
194 | } | 194 | } |
195 | static inline u32 therm_grad_stepping_table_slowdown_factor0_f(u32 v) | 195 | static inline u32 therm_grad_stepping_table_slowdown_factor0_f(u32 v) |
196 | { | 196 | { |
197 | return (v & 0x3f) << 0; | 197 | return (v & 0x3fU) << 0U; |
198 | } | 198 | } |
199 | static inline u32 therm_grad_stepping_table_slowdown_factor0_m(void) | 199 | static inline u32 therm_grad_stepping_table_slowdown_factor0_m(void) |
200 | { | 200 | { |
201 | return 0x3f << 0; | 201 | return 0x3fU << 0U; |
202 | } | 202 | } |
203 | static inline u32 therm_grad_stepping_table_slowdown_factor0_fpdiv_by1p5_f(void) | 203 | static inline u32 therm_grad_stepping_table_slowdown_factor0_fpdiv_by1p5_f(void) |
204 | { | 204 | { |
205 | return 0x1; | 205 | return 0x1U; |
206 | } | 206 | } |
207 | static inline u32 therm_grad_stepping_table_slowdown_factor0_fpdiv_by2_f(void) | 207 | static inline u32 therm_grad_stepping_table_slowdown_factor0_fpdiv_by2_f(void) |
208 | { | 208 | { |
209 | return 0x2; | 209 | return 0x2U; |
210 | } | 210 | } |
211 | static inline u32 therm_grad_stepping_table_slowdown_factor0_fpdiv_by4_f(void) | 211 | static inline u32 therm_grad_stepping_table_slowdown_factor0_fpdiv_by4_f(void) |
212 | { | 212 | { |
213 | return 0x6; | 213 | return 0x6U; |
214 | } | 214 | } |
215 | static inline u32 therm_grad_stepping_table_slowdown_factor0_fpdiv_by8_f(void) | 215 | static inline u32 therm_grad_stepping_table_slowdown_factor0_fpdiv_by8_f(void) |
216 | { | 216 | { |
217 | return 0xe; | 217 | return 0xeU; |
218 | } | 218 | } |
219 | static inline u32 therm_grad_stepping_table_slowdown_factor1_f(u32 v) | 219 | static inline u32 therm_grad_stepping_table_slowdown_factor1_f(u32 v) |
220 | { | 220 | { |
221 | return (v & 0x3f) << 6; | 221 | return (v & 0x3fU) << 6U; |
222 | } | 222 | } |
223 | static inline u32 therm_grad_stepping_table_slowdown_factor1_m(void) | 223 | static inline u32 therm_grad_stepping_table_slowdown_factor1_m(void) |
224 | { | 224 | { |
225 | return 0x3f << 6; | 225 | return 0x3fU << 6U; |
226 | } | 226 | } |
227 | static inline u32 therm_grad_stepping_table_slowdown_factor2_f(u32 v) | 227 | static inline u32 therm_grad_stepping_table_slowdown_factor2_f(u32 v) |
228 | { | 228 | { |
229 | return (v & 0x3f) << 12; | 229 | return (v & 0x3fU) << 12U; |
230 | } | 230 | } |
231 | static inline u32 therm_grad_stepping_table_slowdown_factor2_m(void) | 231 | static inline u32 therm_grad_stepping_table_slowdown_factor2_m(void) |
232 | { | 232 | { |
233 | return 0x3f << 12; | 233 | return 0x3fU << 12U; |
234 | } | 234 | } |
235 | static inline u32 therm_grad_stepping_table_slowdown_factor3_f(u32 v) | 235 | static inline u32 therm_grad_stepping_table_slowdown_factor3_f(u32 v) |
236 | { | 236 | { |
237 | return (v & 0x3f) << 18; | 237 | return (v & 0x3fU) << 18U; |
238 | } | 238 | } |
239 | static inline u32 therm_grad_stepping_table_slowdown_factor3_m(void) | 239 | static inline u32 therm_grad_stepping_table_slowdown_factor3_m(void) |
240 | { | 240 | { |
241 | return 0x3f << 18; | 241 | return 0x3fU << 18U; |
242 | } | 242 | } |
243 | static inline u32 therm_grad_stepping_table_slowdown_factor4_f(u32 v) | 243 | static inline u32 therm_grad_stepping_table_slowdown_factor4_f(u32 v) |
244 | { | 244 | { |
245 | return (v & 0x3f) << 24; | 245 | return (v & 0x3fU) << 24U; |
246 | } | 246 | } |
247 | static inline u32 therm_grad_stepping_table_slowdown_factor4_m(void) | 247 | static inline u32 therm_grad_stepping_table_slowdown_factor4_m(void) |
248 | { | 248 | { |
249 | return 0x3f << 24; | 249 | return 0x3fU << 24U; |
250 | } | 250 | } |
251 | static inline u32 therm_grad_stepping0_r(void) | 251 | static inline u32 therm_grad_stepping0_r(void) |
252 | { | 252 | { |
253 | return 0x000202c0; | 253 | return 0x000202c0U; |
254 | } | 254 | } |
255 | static inline u32 therm_grad_stepping0_feature_s(void) | 255 | static inline u32 therm_grad_stepping0_feature_s(void) |
256 | { | 256 | { |
257 | return 1; | 257 | return 1U; |
258 | } | 258 | } |
259 | static inline u32 therm_grad_stepping0_feature_f(u32 v) | 259 | static inline u32 therm_grad_stepping0_feature_f(u32 v) |
260 | { | 260 | { |
261 | return (v & 0x1) << 0; | 261 | return (v & 0x1U) << 0U; |
262 | } | 262 | } |
263 | static inline u32 therm_grad_stepping0_feature_m(void) | 263 | static inline u32 therm_grad_stepping0_feature_m(void) |
264 | { | 264 | { |
265 | return 0x1 << 0; | 265 | return 0x1U << 0U; |
266 | } | 266 | } |
267 | static inline u32 therm_grad_stepping0_feature_v(u32 r) | 267 | static inline u32 therm_grad_stepping0_feature_v(u32 r) |
268 | { | 268 | { |
269 | return (r >> 0) & 0x1; | 269 | return (r >> 0U) & 0x1U; |
270 | } | 270 | } |
271 | static inline u32 therm_grad_stepping0_feature_enable_f(void) | 271 | static inline u32 therm_grad_stepping0_feature_enable_f(void) |
272 | { | 272 | { |
273 | return 0x1; | 273 | return 0x1U; |
274 | } | 274 | } |
275 | static inline u32 therm_grad_stepping1_r(void) | 275 | static inline u32 therm_grad_stepping1_r(void) |
276 | { | 276 | { |
277 | return 0x000202c4; | 277 | return 0x000202c4U; |
278 | } | 278 | } |
279 | static inline u32 therm_grad_stepping1_pdiv_duration_f(u32 v) | 279 | static inline u32 therm_grad_stepping1_pdiv_duration_f(u32 v) |
280 | { | 280 | { |
281 | return (v & 0x1ffff) << 0; | 281 | return (v & 0x1ffffU) << 0U; |
282 | } | 282 | } |
283 | static inline u32 therm_clk_timing_r(u32 i) | 283 | static inline u32 therm_clk_timing_r(u32 i) |
284 | { | 284 | { |
285 | return 0x000203c0 + i*4; | 285 | return 0x000203c0U + i*4U; |
286 | } | 286 | } |
287 | static inline u32 therm_clk_timing_grad_slowdown_f(u32 v) | 287 | static inline u32 therm_clk_timing_grad_slowdown_f(u32 v) |
288 | { | 288 | { |
289 | return (v & 0x1) << 16; | 289 | return (v & 0x1U) << 16U; |
290 | } | 290 | } |
291 | static inline u32 therm_clk_timing_grad_slowdown_m(void) | 291 | static inline u32 therm_clk_timing_grad_slowdown_m(void) |
292 | { | 292 | { |
293 | return 0x1 << 16; | 293 | return 0x1U << 16U; |
294 | } | 294 | } |
295 | static inline u32 therm_clk_timing_grad_slowdown_enabled_f(void) | 295 | static inline u32 therm_clk_timing_grad_slowdown_enabled_f(void) |
296 | { | 296 | { |
297 | return 0x10000; | 297 | return 0x10000U; |
298 | } | 298 | } |
299 | #endif | 299 | #endif |