summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/clk/clk_vf_point.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/nvgpu/clk/clk_vf_point.c')
-rw-r--r--drivers/gpu/nvgpu/clk/clk_vf_point.c48
1 files changed, 24 insertions, 24 deletions
diff --git a/drivers/gpu/nvgpu/clk/clk_vf_point.c b/drivers/gpu/nvgpu/clk/clk_vf_point.c
index 5fc1d8e5..80eefe96 100644
--- a/drivers/gpu/nvgpu/clk/clk_vf_point.c
+++ b/drivers/gpu/nvgpu/clk/clk_vf_point.c
@@ -29,10 +29,10 @@
29#include "ctrl/ctrlclk.h" 29#include "ctrl/ctrlclk.h"
30#include "ctrl/ctrlvolt.h" 30#include "ctrl/ctrlvolt.h"
31 31
32static u32 _clk_vf_point_pmudatainit_super(struct gk20a *g, struct boardobj 32static int _clk_vf_point_pmudatainit_super(struct gk20a *g, struct boardobj
33 *board_obj_ptr, struct nv_pmu_boardobj *ppmudata); 33 *board_obj_ptr, struct nv_pmu_boardobj *ppmudata);
34 34
35static u32 _clk_vf_points_pmudatainit(struct gk20a *g, 35static int _clk_vf_points_pmudatainit(struct gk20a *g,
36 struct boardobjgrp *pboardobjgrp, 36 struct boardobjgrp *pboardobjgrp,
37 struct nv_pmu_boardobjgrp_super *pboardobjgrppmu) 37 struct nv_pmu_boardobjgrp_super *pboardobjgrppmu)
38{ 38{
@@ -50,7 +50,7 @@ done:
50 return status; 50 return status;
51} 51}
52 52
53static u32 _clk_vf_points_pmudata_instget(struct gk20a *g, 53static int _clk_vf_points_pmudata_instget(struct gk20a *g,
54 struct nv_pmu_boardobjgrp *pmuboardobjgrp, 54 struct nv_pmu_boardobjgrp *pmuboardobjgrp,
55 struct nv_pmu_boardobj **ppboardobjpmudata, 55 struct nv_pmu_boardobj **ppboardobjpmudata,
56 u8 idx) 56 u8 idx)
@@ -72,7 +72,7 @@ static u32 _clk_vf_points_pmudata_instget(struct gk20a *g,
72 return 0; 72 return 0;
73} 73}
74 74
75static u32 _clk_vf_points_pmustatus_instget(struct gk20a *g, 75static int _clk_vf_points_pmustatus_instget(struct gk20a *g,
76 void *pboardobjgrppmu, 76 void *pboardobjgrppmu,
77 struct nv_pmu_boardobj_query **ppboardobjpmustatus, 77 struct nv_pmu_boardobj_query **ppboardobjpmustatus,
78 u8 idx) 78 u8 idx)
@@ -91,9 +91,9 @@ static u32 _clk_vf_points_pmustatus_instget(struct gk20a *g,
91 return 0; 91 return 0;
92} 92}
93 93
94u32 clk_vf_point_sw_setup(struct gk20a *g) 94int clk_vf_point_sw_setup(struct gk20a *g)
95{ 95{
96 u32 status; 96 int status;
97 struct boardobjgrp *pboardobjgrp = NULL; 97 struct boardobjgrp *pboardobjgrp = NULL;
98 98
99 nvgpu_log_info(g, " "); 99 nvgpu_log_info(g, " ");
@@ -138,9 +138,9 @@ done:
138 return status; 138 return status;
139} 139}
140 140
141u32 clk_vf_point_pmu_setup(struct gk20a *g) 141int clk_vf_point_pmu_setup(struct gk20a *g)
142{ 142{
143 u32 status; 143 int status;
144 struct boardobjgrp *pboardobjgrp = NULL; 144 struct boardobjgrp *pboardobjgrp = NULL;
145 145
146 nvgpu_log_info(g, " "); 146 nvgpu_log_info(g, " ");
@@ -157,14 +157,14 @@ u32 clk_vf_point_pmu_setup(struct gk20a *g)
157 return status; 157 return status;
158} 158}
159 159
160static u32 clk_vf_point_construct_super(struct gk20a *g, 160static int clk_vf_point_construct_super(struct gk20a *g,
161 struct boardobj **ppboardobj, 161 struct boardobj **ppboardobj,
162 u16 size, void *pargs) 162 u16 size, void *pargs)
163{ 163{
164 struct clk_vf_point *pclkvfpoint; 164 struct clk_vf_point *pclkvfpoint;
165 struct clk_vf_point *ptmpvfpoint = 165 struct clk_vf_point *ptmpvfpoint =
166 (struct clk_vf_point *)pargs; 166 (struct clk_vf_point *)pargs;
167 u32 status = 0; 167 int status = 0;
168 168
169 status = boardobj_construct_super(g, ppboardobj, 169 status = boardobj_construct_super(g, ppboardobj,
170 size, pargs); 170 size, pargs);
@@ -183,11 +183,11 @@ static u32 clk_vf_point_construct_super(struct gk20a *g,
183 return status; 183 return status;
184} 184}
185 185
186static u32 _clk_vf_point_pmudatainit_volt(struct gk20a *g, 186static int _clk_vf_point_pmudatainit_volt(struct gk20a *g,
187 struct boardobj *board_obj_ptr, 187 struct boardobj *board_obj_ptr,
188 struct nv_pmu_boardobj *ppmudata) 188 struct nv_pmu_boardobj *ppmudata)
189{ 189{
190 u32 status = 0; 190 int status = 0;
191 struct clk_vf_point_volt *pclk_vf_point_volt; 191 struct clk_vf_point_volt *pclk_vf_point_volt;
192 struct nv_pmu_clk_clk_vf_point_volt_boardobj_set *pset; 192 struct nv_pmu_clk_clk_vf_point_volt_boardobj_set *pset;
193 193
@@ -211,11 +211,11 @@ static u32 _clk_vf_point_pmudatainit_volt(struct gk20a *g,
211 return status; 211 return status;
212} 212}
213 213
214static u32 _clk_vf_point_pmudatainit_freq(struct gk20a *g, 214static int _clk_vf_point_pmudatainit_freq(struct gk20a *g,
215 struct boardobj *board_obj_ptr, 215 struct boardobj *board_obj_ptr,
216 struct nv_pmu_boardobj *ppmudata) 216 struct nv_pmu_boardobj *ppmudata)
217{ 217{
218 u32 status = 0; 218 int status = 0;
219 struct clk_vf_point_freq *pclk_vf_point_freq; 219 struct clk_vf_point_freq *pclk_vf_point_freq;
220 struct nv_pmu_clk_clk_vf_point_freq_boardobj_set *pset; 220 struct nv_pmu_clk_clk_vf_point_freq_boardobj_set *pset;
221 221
@@ -240,7 +240,7 @@ static u32 _clk_vf_point_pmudatainit_freq(struct gk20a *g,
240 return status; 240 return status;
241} 241}
242 242
243static u32 clk_vf_point_construct_volt(struct gk20a *g, 243static int clk_vf_point_construct_volt(struct gk20a *g,
244 struct boardobj **ppboardobj, 244 struct boardobj **ppboardobj,
245 u16 size, void *pargs) 245 u16 size, void *pargs)
246{ 246{
@@ -248,7 +248,7 @@ static u32 clk_vf_point_construct_volt(struct gk20a *g,
248 struct clk_vf_point_volt *pclkvfpoint; 248 struct clk_vf_point_volt *pclkvfpoint;
249 struct clk_vf_point_volt *ptmpvfpoint = 249 struct clk_vf_point_volt *ptmpvfpoint =
250 (struct clk_vf_point_volt *)pargs; 250 (struct clk_vf_point_volt *)pargs;
251 u32 status = 0; 251 int status = 0;
252 252
253 if (BOARDOBJ_GET_TYPE(pargs) != CTRL_CLK_CLK_VF_POINT_TYPE_VOLT) { 253 if (BOARDOBJ_GET_TYPE(pargs) != CTRL_CLK_CLK_VF_POINT_TYPE_VOLT) {
254 return -EINVAL; 254 return -EINVAL;
@@ -271,7 +271,7 @@ static u32 clk_vf_point_construct_volt(struct gk20a *g,
271 return status; 271 return status;
272} 272}
273 273
274static u32 clk_vf_point_construct_freq(struct gk20a *g, 274static int clk_vf_point_construct_freq(struct gk20a *g,
275 struct boardobj **ppboardobj, 275 struct boardobj **ppboardobj,
276 u16 size, void *pargs) 276 u16 size, void *pargs)
277{ 277{
@@ -279,7 +279,7 @@ static u32 clk_vf_point_construct_freq(struct gk20a *g,
279 struct clk_vf_point_freq *pclkvfpoint; 279 struct clk_vf_point_freq *pclkvfpoint;
280 struct clk_vf_point_freq *ptmpvfpoint = 280 struct clk_vf_point_freq *ptmpvfpoint =
281 (struct clk_vf_point_freq *)pargs; 281 (struct clk_vf_point_freq *)pargs;
282 u32 status = 0; 282 int status = 0;
283 283
284 if (BOARDOBJ_GET_TYPE(pargs) != CTRL_CLK_CLK_VF_POINT_TYPE_FREQ) { 284 if (BOARDOBJ_GET_TYPE(pargs) != CTRL_CLK_CLK_VF_POINT_TYPE_FREQ) {
285 return -EINVAL; 285 return -EINVAL;
@@ -305,7 +305,7 @@ static u32 clk_vf_point_construct_freq(struct gk20a *g,
305struct clk_vf_point *construct_clk_vf_point(struct gk20a *g, void *pargs) 305struct clk_vf_point *construct_clk_vf_point(struct gk20a *g, void *pargs)
306{ 306{
307 struct boardobj *board_obj_ptr = NULL; 307 struct boardobj *board_obj_ptr = NULL;
308 u32 status; 308 int status;
309 309
310 nvgpu_log_info(g, " "); 310 nvgpu_log_info(g, " ");
311 switch (BOARDOBJ_GET_TYPE(pargs)) { 311 switch (BOARDOBJ_GET_TYPE(pargs)) {
@@ -332,11 +332,11 @@ struct clk_vf_point *construct_clk_vf_point(struct gk20a *g, void *pargs)
332 return (struct clk_vf_point *)board_obj_ptr; 332 return (struct clk_vf_point *)board_obj_ptr;
333} 333}
334 334
335static u32 _clk_vf_point_pmudatainit_super(struct gk20a *g, 335static int _clk_vf_point_pmudatainit_super(struct gk20a *g,
336 struct boardobj *board_obj_ptr, 336 struct boardobj *board_obj_ptr,
337 struct nv_pmu_boardobj *ppmudata) 337 struct nv_pmu_boardobj *ppmudata)
338{ 338{
339 u32 status = 0; 339 int status = 0;
340 struct clk_vf_point *pclk_vf_point; 340 struct clk_vf_point *pclk_vf_point;
341 struct nv_pmu_clk_clk_vf_point_boardobj_set *pset; 341 struct nv_pmu_clk_clk_vf_point_boardobj_set *pset;
342 342
@@ -360,7 +360,7 @@ static u32 _clk_vf_point_pmudatainit_super(struct gk20a *g,
360} 360}
361 361
362 362
363static u32 clk_vf_point_update(struct gk20a *g, 363static int clk_vf_point_update(struct gk20a *g,
364 struct boardobj *board_obj_ptr, 364 struct boardobj *board_obj_ptr,
365 struct nv_pmu_boardobj *ppmudata) 365 struct nv_pmu_boardobj *ppmudata)
366{ 366{
@@ -388,7 +388,7 @@ static u32 clk_vf_point_update(struct gk20a *g,
388} 388}
389 389
390/*get latest vf point data from PMU */ 390/*get latest vf point data from PMU */
391u32 clk_vf_point_cache(struct gk20a *g) 391int clk_vf_point_cache(struct gk20a *g)
392{ 392{
393 393
394 struct clk_vf_points *pclk_vf_points; 394 struct clk_vf_points *pclk_vf_points;
@@ -397,7 +397,7 @@ u32 clk_vf_point_cache(struct gk20a *g)
397 struct nv_pmu_boardobjgrp_super *pboardobjgrppmu; 397 struct nv_pmu_boardobjgrp_super *pboardobjgrppmu;
398 struct boardobj *pboardobj = NULL; 398 struct boardobj *pboardobj = NULL;
399 struct nv_pmu_boardobj_query *pboardobjpmustatus = NULL; 399 struct nv_pmu_boardobj_query *pboardobjpmustatus = NULL;
400 u32 status; 400 int status;
401 u8 index; 401 u8 index;
402 402
403 nvgpu_log_info(g, " "); 403 nvgpu_log_info(g, " ");