gpu: nvgpu: Segregate volt unit members based on their accessibility

Currently all unit specific private members are inside ucode_volt_inf.h.
This patch moves the members specific to pmuif to ucode_volt_inf.h and
local to volt.h.
Append all unit specific local functions with volt/nvgpu.
Move volt specific rpc handler from g->pmu to g->pmu->volt.

NVGPU-4492

Change-Id: I626e002b3876c6c5330dec4396b7661b986c6119
Signed-off-by: Abdul Salam <absalam@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2299555
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: Vaibhav Kachore <vkachore@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
GVS: Gerrit_Virtual_Submit
This commit is contained in:
Abdul Salam
2020-02-25 12:06:28 +05:30
committed by Alex Waterman
parent 7fb3410d72
commit 29d4831780
17 changed files with 266 additions and 224 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2019, NVIDIA Corporation. All rights reserved.
* Copyright (c) 2019-2020, NVIDIA Corporation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms and conditions of the GNU General Public License,
@@ -25,7 +25,7 @@ static int get_curr_voltage(void *data, u64 *val)
u32 readval;
int err;
err = nvgpu_volt_get_curr_volt_ps35(g, &readval);
err = nvgpu_pmu_volt_get_curr_volt_ps35(g, &readval);
if (!err)
*val = readval;
@@ -39,7 +39,7 @@ static int get_min_voltage(void *data, u64 *val)
u32 minval, maxval;
int err;
err = nvgpu_volt_get_vmin_vmax_ps35(g, &minval, &maxval);
err = nvgpu_pmu_volt_get_vmin_vmax_ps35(g, &minval, &maxval);
if (!err)
*val = minval;
@@ -53,7 +53,7 @@ static int get_max_voltage(void *data, u64 *val)
u32 minval, maxval;
int err;
err = nvgpu_volt_get_vmin_vmax_ps35(g, &minval, &maxval);
err = nvgpu_pmu_volt_get_vmin_vmax_ps35(g, &minval, &maxval);
if (!err)
*val = maxval;