diff options
author | Terje Bergstrom <tbergstrom@nvidia.com> | 2017-04-06 15:17:26 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2017-04-07 16:48:24 -0400 |
commit | 1add126551309a323ae422be41c9db2203bbe112 (patch) | |
tree | d9a620ca88a3c73c0f3dc0f7079ea4d3c24eb075 /drivers/gpu/nvgpu/clk/clk_prog.c | |
parent | 86ecddf68734e4a938eda351f4dde11ab507de3f (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_prog.c')
-rw-r--r-- | drivers/gpu/nvgpu/clk/clk_prog.c | 25 |
1 files changed, 10 insertions, 15 deletions
diff --git a/drivers/gpu/nvgpu/clk/clk_prog.c b/drivers/gpu/nvgpu/clk/clk_prog.c index dc9c58a6..5697c255 100644 --- a/drivers/gpu/nvgpu/clk/clk_prog.c +++ b/drivers/gpu/nvgpu/clk/clk_prog.c | |||
@@ -46,8 +46,7 @@ static u32 _clk_progs_pmudatainit(struct gk20a *g, | |||
46 | 46 | ||
47 | status = boardobjgrp_pmudatainit_e32(g, pboardobjgrp, pboardobjgrppmu); | 47 | status = boardobjgrp_pmudatainit_e32(g, pboardobjgrp, pboardobjgrppmu); |
48 | if (status) { | 48 | if (status) { |
49 | gk20a_err(dev_from_gk20a(g), | 49 | nvgpu_err(g, "error updating pmu boardobjgrp for clk prog 0x%x", |
50 | "error updating pmu boardobjgrp for clk prog 0x%x", | ||
51 | status); | 50 | status); |
52 | goto done; | 51 | goto done; |
53 | } | 52 | } |
@@ -89,7 +88,7 @@ u32 clk_prog_sw_setup(struct gk20a *g) | |||
89 | 88 | ||
90 | status = boardobjgrpconstruct_e255(&g->clk_pmu.clk_progobjs.super); | 89 | status = boardobjgrpconstruct_e255(&g->clk_pmu.clk_progobjs.super); |
91 | if (status) { | 90 | if (status) { |
92 | gk20a_err(dev_from_gk20a(g), | 91 | nvgpu_err(g, |
93 | "error creating boardobjgrp for clk prog, status - 0x%x", | 92 | "error creating boardobjgrp for clk prog, status - 0x%x", |
94 | status); | 93 | status); |
95 | goto done; | 94 | goto done; |
@@ -103,7 +102,7 @@ u32 clk_prog_sw_setup(struct gk20a *g) | |||
103 | status = BOARDOBJGRP_PMU_CMD_GRP_SET_CONSTRUCT(g, pboardobjgrp, | 102 | status = BOARDOBJGRP_PMU_CMD_GRP_SET_CONSTRUCT(g, pboardobjgrp, |
104 | clk, CLK, clk_prog, CLK_PROG); | 103 | clk, CLK, clk_prog, CLK_PROG); |
105 | if (status) { | 104 | if (status) { |
106 | gk20a_err(dev_from_gk20a(g), | 105 | nvgpu_err(g, |
107 | "error constructing PMU_BOARDOBJ_CMD_GRP_SET interface - 0x%x", | 106 | "error constructing PMU_BOARDOBJ_CMD_GRP_SET interface - 0x%x", |
108 | status); | 107 | status); |
109 | goto done; | 108 | goto done; |
@@ -118,8 +117,7 @@ u32 clk_prog_sw_setup(struct gk20a *g) | |||
118 | 117 | ||
119 | status = clk_domain_clk_prog_link(g, &g->clk_pmu); | 118 | status = clk_domain_clk_prog_link(g, &g->clk_pmu); |
120 | if (status) { | 119 | if (status) { |
121 | gk20a_err(dev_from_gk20a(g), | 120 | nvgpu_err(g, "error constructing VF point board objects"); |
122 | "error constructing VF point board objects"); | ||
123 | goto done; | 121 | goto done; |
124 | } | 122 | } |
125 | 123 | ||
@@ -265,8 +263,7 @@ static u32 devinit_get_clk_prog_table(struct gk20a *g, | |||
265 | break; | 263 | break; |
266 | 264 | ||
267 | default: | 265 | default: |
268 | gk20a_err(dev_from_gk20a(g), | 266 | nvgpu_err(g, "invalid source %d", prog_type); |
269 | "invalid source %d", prog_type); | ||
270 | status = -EINVAL; | 267 | status = -EINVAL; |
271 | goto done; | 268 | goto done; |
272 | } | 269 | } |
@@ -346,16 +343,15 @@ static u32 devinit_get_clk_prog_table(struct gk20a *g, | |||
346 | 343 | ||
347 | 344 | ||
348 | default: | 345 | default: |
349 | gk20a_err(dev_from_gk20a(g), | 346 | nvgpu_err(g, "source issue %d", prog_type); |
350 | "source issue %d", prog_type); | ||
351 | status = -EINVAL; | 347 | status = -EINVAL; |
352 | goto done; | 348 | goto done; |
353 | } | 349 | } |
354 | 350 | ||
355 | pprog = construct_clk_prog(g, (void *)&prog_data); | 351 | pprog = construct_clk_prog(g, (void *)&prog_data); |
356 | if (pprog == NULL) { | 352 | if (pprog == NULL) { |
357 | gk20a_err(dev_from_gk20a(g), | 353 | nvgpu_err(g, |
358 | "error constructing clk_prog boardobj %d", i); | 354 | "error constructing clk_prog boardobj %d", i); |
359 | status = -EINVAL; | 355 | status = -EINVAL; |
360 | goto done; | 356 | goto done; |
361 | } | 357 | } |
@@ -363,8 +359,7 @@ static u32 devinit_get_clk_prog_table(struct gk20a *g, | |||
363 | status = boardobjgrp_objinsert(&pclkprogobjs->super.super, | 359 | status = boardobjgrp_objinsert(&pclkprogobjs->super.super, |
364 | (struct boardobj *)pprog, i); | 360 | (struct boardobj *)pprog, i); |
365 | if (status) { | 361 | if (status) { |
366 | gk20a_err(dev_from_gk20a(g), | 362 | nvgpu_err(g, "error adding clk_prog boardobj %d", i); |
367 | "error adding clk_prog boardobj %d", i); | ||
368 | status = -EINVAL; | 363 | status = -EINVAL; |
369 | goto done; | 364 | goto done; |
370 | } | 365 | } |
@@ -930,7 +925,7 @@ static u32 vflookup_prog_1x_master | |||
930 | for (j = pvfentry->vf_point_idx_first; | 925 | for (j = pvfentry->vf_point_idx_first; |
931 | j <= pvfentry->vf_point_idx_last; j++) { | 926 | j <= pvfentry->vf_point_idx_last; j++) { |
932 | pvfpoint = CLK_CLK_VF_POINT_GET(pclk, j); | 927 | pvfpoint = CLK_CLK_VF_POINT_GET(pclk, j); |
933 | gk20a_err(dev_from_gk20a(g), "v %x c %x", | 928 | nvgpu_err(g, "v %x c %x", |
934 | clkvfpointvoltageuvget(g, pvfpoint), | 929 | clkvfpointvoltageuvget(g, pvfpoint), |
935 | clkvfpointfreqmhzget(g, pvfpoint)); | 930 | clkvfpointfreqmhzget(g, pvfpoint)); |
936 | } | 931 | } |