summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/clk/clk_freq_controller.c
diff options
context:
space:
mode:
authorTerje Bergstrom <tbergstrom@nvidia.com>2017-04-06 15:17:26 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2017-04-07 16:48:24 -0400
commit1add126551309a323ae422be41c9db2203bbe112 (patch)
treed9a620ca88a3c73c0f3dc0f7079ea4d3c24eb075 /drivers/gpu/nvgpu/clk/clk_freq_controller.c
parent86ecddf68734e4a938eda351f4dde11ab507de3f (diff)
gpu: nvgpu: clk: Use new error macros
gk20a_err() and gk20a_warn() require a struct device pointer, which is not portable across operating systems. The new nvgpu_err() and nvgpu_warn() macros take struct gk20a pointer. Convert code to use the more portable macros. JIRA NVGPU-16 Change-Id: I58bb9e2fb7e5b18f74fbb92b70150cce97968fc3 Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com> Reviewed-on: http://git-master/r/1457347 Reviewed-by: Alex Waterman <alexw@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/clk/clk_freq_controller.c')
-rw-r--r--drivers/gpu/nvgpu/clk/clk_freq_controller.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/drivers/gpu/nvgpu/clk/clk_freq_controller.c b/drivers/gpu/nvgpu/clk/clk_freq_controller.c
index 4b47d978..61c8b81b 100644
--- a/drivers/gpu/nvgpu/clk/clk_freq_controller.c
+++ b/drivers/gpu/nvgpu/clk/clk_freq_controller.c
@@ -287,7 +287,7 @@ static u32 clk_get_freq_controller_table(struct gk20a *g,
287 (void *)&freq_controller_data); 287 (void *)&freq_controller_data);
288 288
289 if (pclk_freq_cntr == NULL) { 289 if (pclk_freq_cntr == NULL) {
290 gk20a_err(dev_from_gk20a(g), 290 nvgpu_err(g,
291 "unable to construct clock freq cntlr boardobj for %d", 291 "unable to construct clock freq cntlr boardobj for %d",
292 entry_idx); 292 entry_idx);
293 status = -EINVAL; 293 status = -EINVAL;
@@ -298,7 +298,7 @@ static u32 clk_get_freq_controller_table(struct gk20a *g,
298 &pclk_freq_controllers->super.super, 298 &pclk_freq_controllers->super.super,
299 (struct boardobj *)pclk_freq_cntr, entry_idx); 299 (struct boardobj *)pclk_freq_cntr, entry_idx);
300 if (status) { 300 if (status) {
301 gk20a_err(dev_from_gk20a(g), 301 nvgpu_err(g,
302 "unable to insert clock freq cntlr boardobj for"); 302 "unable to insert clock freq cntlr boardobj for");
303 status = -EINVAL; 303 status = -EINVAL;
304 goto done; 304 goto done;
@@ -363,7 +363,7 @@ static u32 _clk_freq_controllers_pmudatainit(struct gk20a *g,
363 363
364 status = boardobjgrp_pmudatainit_e32(g, pboardobjgrp, pboardobjgrppmu); 364 status = boardobjgrp_pmudatainit_e32(g, pboardobjgrp, pboardobjgrppmu);
365 if (status) { 365 if (status) {
366 gk20a_err(dev_from_gk20a(g), 366 nvgpu_err(g,
367 "error updating pmu boardobjgrp for clk freq ctrs 0x%x", 367 "error updating pmu boardobjgrp for clk freq ctrs 0x%x",
368 status); 368 status);
369 goto done; 369 goto done;
@@ -391,7 +391,7 @@ u32 clk_freq_controller_sw_setup(struct gk20a *g)
391 pclk_freq_controllers = &g->clk_pmu.clk_freq_controllers; 391 pclk_freq_controllers = &g->clk_pmu.clk_freq_controllers;
392 status = boardobjgrpconstruct_e32(&pclk_freq_controllers->super); 392 status = boardobjgrpconstruct_e32(&pclk_freq_controllers->super);
393 if (status) { 393 if (status) {
394 gk20a_err(dev_from_gk20a(g), 394 nvgpu_err(g,
395 "error creating boardobjgrp for clk FCT, status - 0x%x", 395 "error creating boardobjgrp for clk FCT, status - 0x%x",
396 status); 396 status);
397 goto done; 397 goto done;
@@ -413,7 +413,7 @@ u32 clk_freq_controller_sw_setup(struct gk20a *g)
413 status = BOARDOBJGRP_PMU_CMD_GRP_SET_CONSTRUCT(g, pboardobjgrp, 413 status = BOARDOBJGRP_PMU_CMD_GRP_SET_CONSTRUCT(g, pboardobjgrp,
414 clk, CLK, clk_freq_controller, CLK_FREQ_CONTROLLER); 414 clk, CLK, clk_freq_controller, CLK_FREQ_CONTROLLER);
415 if (status) { 415 if (status) {
416 gk20a_err(dev_from_gk20a(g), 416 nvgpu_err(g,
417 "error constructing PMU_BOARDOBJ_CMD_GRP_SET interface - 0x%x", 417 "error constructing PMU_BOARDOBJ_CMD_GRP_SET interface - 0x%x",
418 status); 418 status);
419 goto done; 419 goto done;
@@ -421,8 +421,7 @@ u32 clk_freq_controller_sw_setup(struct gk20a *g)
421 421
422 status = clk_get_freq_controller_table(g, pclk_freq_controllers); 422 status = clk_get_freq_controller_table(g, pclk_freq_controllers);
423 if (status) { 423 if (status) {
424 gk20a_err(dev_from_gk20a(g), 424 nvgpu_err(g, "error reading freq controller table - 0x%x",
425 "error reading freq controller table - 0x%x",
426 status); 425 status);
427 goto done; 426 goto done;
428 } 427 }