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_vf_point.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_vf_point.c')
-rw-r--r-- | drivers/gpu/nvgpu/clk/clk_vf_point.c | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/drivers/gpu/nvgpu/clk/clk_vf_point.c b/drivers/gpu/nvgpu/clk/clk_vf_point.c index f4019f9d..3ec111f0 100644 --- a/drivers/gpu/nvgpu/clk/clk_vf_point.c +++ b/drivers/gpu/nvgpu/clk/clk_vf_point.c | |||
@@ -31,7 +31,7 @@ static u32 _clk_vf_points_pmudatainit(struct gk20a *g, | |||
31 | 31 | ||
32 | status = boardobjgrp_pmudatainit_e32(g, pboardobjgrp, pboardobjgrppmu); | 32 | status = boardobjgrp_pmudatainit_e32(g, pboardobjgrp, pboardobjgrppmu); |
33 | if (status) { | 33 | if (status) { |
34 | gk20a_err(dev_from_gk20a(g), | 34 | nvgpu_err(g, |
35 | "error updating pmu boardobjgrp for clk vfpoint 0x%x", | 35 | "error updating pmu boardobjgrp for clk vfpoint 0x%x", |
36 | status); | 36 | status); |
37 | goto done; | 37 | goto done; |
@@ -90,7 +90,7 @@ u32 clk_vf_point_sw_setup(struct gk20a *g) | |||
90 | 90 | ||
91 | status = boardobjgrpconstruct_e255(&g->clk_pmu.clk_vf_pointobjs.super); | 91 | status = boardobjgrpconstruct_e255(&g->clk_pmu.clk_vf_pointobjs.super); |
92 | if (status) { | 92 | if (status) { |
93 | gk20a_err(dev_from_gk20a(g), | 93 | nvgpu_err(g, |
94 | "error creating boardobjgrp for clk vfpoint, status - 0x%x", | 94 | "error creating boardobjgrp for clk vfpoint, status - 0x%x", |
95 | status); | 95 | status); |
96 | goto done; | 96 | goto done; |
@@ -104,7 +104,7 @@ u32 clk_vf_point_sw_setup(struct gk20a *g) | |||
104 | status = BOARDOBJGRP_PMU_CMD_GRP_SET_CONSTRUCT(g, pboardobjgrp, | 104 | status = BOARDOBJGRP_PMU_CMD_GRP_SET_CONSTRUCT(g, pboardobjgrp, |
105 | clk, CLK, clk_vf_point, CLK_VF_POINT); | 105 | clk, CLK, clk_vf_point, CLK_VF_POINT); |
106 | if (status) { | 106 | if (status) { |
107 | gk20a_err(dev_from_gk20a(g), | 107 | nvgpu_err(g, |
108 | "error constructing PMU_BOARDOBJ_CMD_GRP_SET interface - 0x%x", | 108 | "error constructing PMU_BOARDOBJ_CMD_GRP_SET interface - 0x%x", |
109 | status); | 109 | status); |
110 | goto done; | 110 | goto done; |
@@ -114,7 +114,7 @@ u32 clk_vf_point_sw_setup(struct gk20a *g) | |||
114 | &g->clk_pmu.clk_vf_pointobjs.super.super, | 114 | &g->clk_pmu.clk_vf_pointobjs.super.super, |
115 | clk, CLK, clk_vf_point, CLK_VF_POINT); | 115 | clk, CLK, clk_vf_point, CLK_VF_POINT); |
116 | if (status) { | 116 | if (status) { |
117 | gk20a_err(dev_from_gk20a(g), | 117 | nvgpu_err(g, |
118 | "error constructing PMU_BOARDOBJ_CMD_GRP_SET interface - 0x%x", | 118 | "error constructing PMU_BOARDOBJ_CMD_GRP_SET interface - 0x%x", |
119 | status); | 119 | status); |
120 | goto done; | 120 | goto done; |
@@ -356,7 +356,7 @@ static u32 clk_vf_point_update(struct gk20a *g, | |||
356 | ppmudata; | 356 | ppmudata; |
357 | 357 | ||
358 | if (pstatus->super.type != pclk_vf_point->super.type) { | 358 | if (pstatus->super.type != pclk_vf_point->super.type) { |
359 | gk20a_err(dev_from_gk20a(g), | 359 | nvgpu_err(g, |
360 | "pmu data and boardobj type not matching"); | 360 | "pmu data and boardobj type not matching"); |
361 | return -EINVAL; | 361 | return -EINVAL; |
362 | } | 362 | } |
@@ -386,7 +386,7 @@ u32 clk_vf_point_cache(struct gk20a *g) | |||
386 | 386 | ||
387 | status = pboardobjgrp->pmugetstatus(g, pboardobjgrp, pboardobjgrpmask); | 387 | status = pboardobjgrp->pmugetstatus(g, pboardobjgrp, pboardobjgrpmask); |
388 | if (status) { | 388 | if (status) { |
389 | gk20a_err(dev_from_gk20a(g), "err getting boardobjs from pmu"); | 389 | nvgpu_err(g, "err getting boardobjs from pmu"); |
390 | return status; | 390 | return status; |
391 | } | 391 | } |
392 | pboardobjgrppmu = pboardobjgrp->pmu.getstatus.buf; | 392 | pboardobjgrppmu = pboardobjgrp->pmu.getstatus.buf; |
@@ -396,16 +396,14 @@ u32 clk_vf_point_cache(struct gk20a *g) | |||
396 | (struct nv_pmu_boardobjgrp *)pboardobjgrppmu, | 396 | (struct nv_pmu_boardobjgrp *)pboardobjgrppmu, |
397 | &pboardobjpmustatus, index); | 397 | &pboardobjpmustatus, index); |
398 | if (status) { | 398 | if (status) { |
399 | gk20a_err(dev_from_gk20a(g), | 399 | nvgpu_err(g, "could not get status object instance"); |
400 | "could not get status object instance"); | ||
401 | return status; | 400 | return status; |
402 | } | 401 | } |
403 | 402 | ||
404 | status = clk_vf_point_update(g, pboardobj, | 403 | status = clk_vf_point_update(g, pboardobj, |
405 | (struct nv_pmu_boardobj *)pboardobjpmustatus); | 404 | (struct nv_pmu_boardobj *)pboardobjpmustatus); |
406 | if (status) { | 405 | if (status) { |
407 | gk20a_err(dev_from_gk20a(g), | 406 | nvgpu_err(g, "invalid data from pmu at %d", index); |
408 | "invalid data from pmu at %d", index); | ||
409 | return status; | 407 | return status; |
410 | } | 408 | } |
411 | } | 409 | } |