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/gk20a/gk20a.c | 4 ++-- drivers/gpu/nvgpu/gk20a/gk20a.h | 10 ++-------- 2 files changed, 4 insertions(+), 10 deletions(-) (limited to 'drivers/gpu/nvgpu/gk20a') diff --git a/drivers/gpu/nvgpu/gk20a/gk20a.c b/drivers/gpu/nvgpu/gk20a/gk20a.c index ee6586ae..91c82104 100644 --- a/drivers/gpu/nvgpu/gk20a/gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/gk20a.c @@ -918,8 +918,8 @@ int gk20a_pm_finalize_poweron(struct device *dev) g->gpu_reset_done = true; } - if (g->ops.bios.init) - err = g->ops.bios.init(g); + if (g->ops.bios_init) + err = g->ops.bios_init(g); if (err) goto done; diff --git a/drivers/gpu/nvgpu/gk20a/gk20a.h b/drivers/gpu/nvgpu/gk20a/gk20a.h index 7f2383d9..b796b2cc 100644 --- a/drivers/gpu/nvgpu/gk20a/gk20a.h +++ b/drivers/gpu/nvgpu/gk20a/gk20a.h @@ -54,7 +54,6 @@ struct acr_desc; #include "cde_gk20a.h" #include "debug_gk20a.h" #include "sched_gk20a.h" -#include "gm206/bios_gm206.h" #ifdef CONFIG_ARCH_TEGRA_18x_SOC #include "clk/clk.h" #include "clk/clk_arb.h" @@ -62,7 +61,6 @@ struct acr_desc; #include "pmgr/pmgr.h" #include "therm/thrm.h" #endif -#include "gm206/bios_gm206.h" #if LINUX_VERSION_CODE < KERNEL_VERSION(3, 18, 0) #define WRITE_ONCE(x, val) \ @@ -751,12 +749,8 @@ struct gpu_ops { int (*chip_init_gpu_characteristics)(struct gk20a *g); int (*read_ptimer)(struct gk20a *g, u64 *value); - struct { - int (*init)(struct gk20a *g); - void *(*get_perf_table_ptrs)(struct gk20a *g, - struct bit_token *ptoken, u8 table_id); - int (*execute_script)(struct gk20a *g, u32 offset); - } bios; + int (*bios_init)(struct gk20a *g); + #if defined(CONFIG_GK20A_CYCLE_STATS) struct { int (*enable_snapshot)(struct channel_gk20a *ch, -- cgit v1.2.2