From 53465def649b813987ca0d4a7ced744305204b82 Mon Sep 17 00:00:00 2001 From: Terje Bergstrom Date: Thu, 9 Feb 2017 08:17:47 -0800 Subject: 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 Change-Id: Id48e94c74511d6e95645e90e5bba5c12ef8da45d Signed-off-by: Terje Bergstrom Reviewed-on: http://git-master/r/1302222 GVS: Gerrit_Virtual_Submit --- drivers/gpu/nvgpu/pstate/pstate.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'drivers/gpu/nvgpu/pstate') diff --git a/drivers/gpu/nvgpu/pstate/pstate.c b/drivers/gpu/nvgpu/pstate/pstate.c index 82e809bb..feb8cca8 100644 --- a/drivers/gpu/nvgpu/pstate/pstate.c +++ b/drivers/gpu/nvgpu/pstate/pstate.c @@ -13,11 +13,12 @@ * more details. */ +#include + #include "gk20a/gk20a.h" #include "clk/clk.h" #include "perf/perf.h" #include "pmgr/pmgr.h" -#include "include/bios.h" #include "pstate/pstate.h" #include "therm/thrm.h" @@ -342,11 +343,9 @@ static int pstate_sw_setup(struct gk20a *g) goto done; } - if (g->ops.bios.get_perf_table_ptrs) { - hdr = (struct vbios_pstate_header_5x *) - g->ops.bios.get_perf_table_ptrs(g, - g->bios.perf_token, PERFORMANCE_TABLE); - } + hdr = (struct vbios_pstate_header_5x *) + nvgpu_bios_get_perf_table_ptrs(g, + g->bios.perf_token, PERFORMANCE_TABLE); if (!hdr) { gk20a_err(dev_from_gk20a(g), -- cgit v1.2.2