diff options
author | Terje Bergstrom <tbergstrom@nvidia.com> | 2017-02-09 11:17:47 -0500 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2017-02-17 16:46:32 -0500 |
commit | 53465def649b813987ca0d4a7ced744305204b82 (patch) | |
tree | cdff16681cb0442de3b1a8bd151b2a38c0bc5311 /drivers/gpu/nvgpu/volt/volt_dev.c | |
parent | 29a79e6b80c6a0da489d8b0a470c86e2fec9c355 (diff) |
gpu: nvgpu: Generalize BIOS code
Most of BIOS parsing code is not specific to any particular GPU. Move
most of the code to generic files, and leave only chip specific parts
dealing with microcontroller boot into chip specific files.
As most of the parsing is generic, they do not need to be called via
HALs so remove the HALs and change the calls into direct function
calls.
All definitions meant to be used outside BIOS code itself are now in
<nvgpu/bios.h>
Change-Id: Id48e94c74511d6e95645e90e5bba5c12ef8da45d
Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-on: http://git-master/r/1302222
GVS: Gerrit_Virtual_Submit
Diffstat (limited to 'drivers/gpu/nvgpu/volt/volt_dev.c')
-rw-r--r-- | drivers/gpu/nvgpu/volt/volt_dev.c | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/drivers/gpu/nvgpu/volt/volt_dev.c b/drivers/gpu/nvgpu/volt/volt_dev.c index ebc140ef..4807f023 100644 --- a/drivers/gpu/nvgpu/volt/volt_dev.c +++ b/drivers/gpu/nvgpu/volt/volt_dev.c | |||
@@ -14,17 +14,17 @@ | |||
14 | #include <linux/sort.h> | 14 | #include <linux/sort.h> |
15 | 15 | ||
16 | #include "gk20a/gk20a.h" | 16 | #include "gk20a/gk20a.h" |
17 | #include "include/bios.h" | ||
18 | #include "boardobj/boardobjgrp.h" | 17 | #include "boardobj/boardobjgrp.h" |
19 | #include "boardobj/boardobjgrp_e32.h" | 18 | #include "boardobj/boardobjgrp_e32.h" |
20 | #include "gm206/bios_gm206.h" | 19 | #include "gm206/bios_gm206.h" |
21 | #include "ctrl/ctrlvolt.h" | 20 | #include "ctrl/ctrlvolt.h" |
22 | #include "gk20a/pmu_gk20a.h" | 21 | #include "gk20a/pmu_gk20a.h" |
23 | 22 | ||
24 | #include "include/bios.h" | ||
25 | #include "volt.h" | 23 | #include "volt.h" |
26 | #include <nvgpu/pmuif/nvgpu_gpmu_cmdif.h> | 24 | #include <nvgpu/pmuif/nvgpu_gpmu_cmdif.h> |
27 | 25 | ||
26 | #include <nvgpu/bios.h> | ||
27 | |||
28 | #define VOLT_DEV_PWM_VOLTAGE_STEPS_INVALID 0 | 28 | #define VOLT_DEV_PWM_VOLTAGE_STEPS_INVALID 0 |
29 | #define VOLT_DEV_PWM_VOLTAGE_STEPS_DEFAULT 1 | 29 | #define VOLT_DEV_PWM_VOLTAGE_STEPS_DEFAULT 1 |
30 | 30 | ||
@@ -363,14 +363,9 @@ static u32 volt_get_volt_devices_table(struct gk20a *g, | |||
363 | u8 entry_idx; | 363 | u8 entry_idx; |
364 | u8 *entry_offset; | 364 | u8 *entry_offset; |
365 | 365 | ||
366 | if (g->ops.bios.get_perf_table_ptrs) { | 366 | volt_device_table_ptr = (u8 *)nvgpu_bios_get_perf_table_ptrs(g, |
367 | volt_device_table_ptr = (u8 *)g->ops.bios.get_perf_table_ptrs(g, | 367 | g->bios.perf_token, VOLTAGE_DEVICE_TABLE); |
368 | g->bios.perf_token, VOLTAGE_DEVICE_TABLE); | 368 | if (volt_device_table_ptr == NULL) { |
369 | if (volt_device_table_ptr == NULL) { | ||
370 | status = -EINVAL; | ||
371 | goto done; | ||
372 | } | ||
373 | } else { | ||
374 | status = -EINVAL; | 369 | status = -EINVAL; |
375 | goto done; | 370 | goto done; |
376 | } | 371 | } |