summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/pmgr/pmgrpmu.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/nvgpu/pmgr/pmgrpmu.c')
-rw-r--r--drivers/gpu/nvgpu/pmgr/pmgrpmu.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/drivers/gpu/nvgpu/pmgr/pmgrpmu.c b/drivers/gpu/nvgpu/pmgr/pmgrpmu.c
index ed33c08c..3398e8df 100644
--- a/drivers/gpu/nvgpu/pmgr/pmgrpmu.c
+++ b/drivers/gpu/nvgpu/pmgr/pmgrpmu.c
@@ -26,8 +26,6 @@
26 26
27#include "gk20a/gk20a.h" 27#include "gk20a/gk20a.h"
28#include "gp106/bios_gp106.h" 28#include "gp106/bios_gp106.h"
29#include "common/linux/os_linux.h"
30#include "common/linux/platform_gk20a.h"
31 29
32#include "boardobj/boardobjgrp.h" 30#include "boardobj/boardobjgrp.h"
33#include "boardobj/boardobjgrp_e32.h" 31#include "boardobj/boardobjgrp_e32.h"
@@ -148,8 +146,7 @@ exit:
148static u32 pmgr_send_i2c_device_topology_to_pmu(struct gk20a *g) 146static u32 pmgr_send_i2c_device_topology_to_pmu(struct gk20a *g)
149{ 147{
150 struct nv_pmu_pmgr_i2c_device_desc_table i2c_desc_table; 148 struct nv_pmu_pmgr_i2c_device_desc_table i2c_desc_table;
151 struct gk20a_platform *platform = gk20a_get_platform(dev_from_gk20a(g)); 149 u32 idx = g->ina3221_dcb_index;
152 u32 idx = platform->ina3221_dcb_index;
153 u32 status = 0; 150 u32 status = 0;
154 151
155 /* INA3221 I2C device info */ 152 /* INA3221 I2C device info */
@@ -159,9 +156,9 @@ static u32 pmgr_send_i2c_device_topology_to_pmu(struct gk20a *g)
159 i2c_desc_table.devices[idx].super.type = 0x4E; 156 i2c_desc_table.devices[idx].super.type = 0x4E;
160 157
161 i2c_desc_table.devices[idx].dcb_index = idx; 158 i2c_desc_table.devices[idx].dcb_index = idx;
162 i2c_desc_table.devices[idx].i2c_address = platform->ina3221_i2c_address; 159 i2c_desc_table.devices[idx].i2c_address = g->ina3221_i2c_address;
163 i2c_desc_table.devices[idx].i2c_flags = 0xC2F; 160 i2c_desc_table.devices[idx].i2c_flags = 0xC2F;
164 i2c_desc_table.devices[idx].i2c_port = platform->ina3221_i2c_port; 161 i2c_desc_table.devices[idx].i2c_port = g->ina3221_i2c_port;
165 162
166 /* Pass the table down the PMU as an object */ 163 /* Pass the table down the PMU as an object */
167 status = pmgr_pmu_set_object( 164 status = pmgr_pmu_set_object(
@@ -220,7 +217,7 @@ static u32 pmgr_send_pwr_device_topology_to_pmu(struct gk20a *g)
220 status); 217 status);
221 218
222exit: 219exit:
223 kfree(pwr_desc_table); 220 nvgpu_kfree(g, pwr_desc_table);
224 return status; 221 return status;
225} 222}
226 223
@@ -289,7 +286,7 @@ static u32 pmgr_send_pwr_mointer_to_pmu(struct gk20a *g)
289 status); 286 status);
290 287
291exit: 288exit:
292 kfree(pwr_monitor_pack); 289 nvgpu_kfree(g, pwr_monitor_pack);
293 return status; 290 return status;
294} 291}
295 292