diff options
author | Terje Bergstrom <tbergstrom@nvidia.com> | 2017-02-09 11:32:02 -0500 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2017-02-13 12:43:09 -0500 |
commit | ed35f0a4042074463bf52ba04583fde680d1d389 (patch) | |
tree | 7052337e9457e87e2829490942a7c563a742cb2f /drivers/gpu/nvgpu/gm206/bios_gm206.c | |
parent | 9af510574957fc885a4ae9f96d23c6ad464eeb8f (diff) |
gpu: nvgpu: Add enable/disable shadow ROM HAL
Add HAL for enabling and disabling shadow ROM. This removes XVE dependency
from bios code.
Change-Id: Icafec72dae71669376bbfb97077661b7165badb8
Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-on: http://git-master/r/1302223
Diffstat (limited to 'drivers/gpu/nvgpu/gm206/bios_gm206.c')
-rw-r--r-- | drivers/gpu/nvgpu/gm206/bios_gm206.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/gpu/nvgpu/gm206/bios_gm206.c b/drivers/gpu/nvgpu/gm206/bios_gm206.c index bfb90e19..fa736da5 100644 --- a/drivers/gpu/nvgpu/gm206/bios_gm206.c +++ b/drivers/gpu/nvgpu/gm206/bios_gm206.c | |||
@@ -24,7 +24,6 @@ | |||
24 | 24 | ||
25 | #include <nvgpu/hw/gm206/hw_pwr_gm206.h> | 25 | #include <nvgpu/hw/gm206/hw_pwr_gm206.h> |
26 | #include <nvgpu/hw/gm206/hw_mc_gm206.h> | 26 | #include <nvgpu/hw/gm206/hw_mc_gm206.h> |
27 | #include <nvgpu/hw/gm206/hw_xve_gm206.h> | ||
28 | #include <nvgpu/hw/gm206/hw_top_gm206.h> | 27 | #include <nvgpu/hw/gm206/hw_top_gm206.h> |
29 | 28 | ||
30 | #define BIT_HEADER_ID 0xb8ff | 29 | #define BIT_HEADER_ID 0xb8ff |
@@ -868,8 +867,7 @@ static int gm206_bios_init(struct gk20a *g) | |||
868 | g->bios.data = vmalloc(BIOS_SIZE); | 867 | g->bios.data = vmalloc(BIOS_SIZE); |
869 | if (!g->bios.data) | 868 | if (!g->bios.data) |
870 | return -ENOMEM; | 869 | return -ENOMEM; |
871 | gk20a_writel(g, NV_PCFG + xve_rom_ctrl_r(), | 870 | g->ops.xve.disable_shadow_rom(g); |
872 | xve_rom_ctrl_rom_shadow_disabled_f()); | ||
873 | for (i = 0; i < g->bios.size/4; i++) { | 871 | for (i = 0; i < g->bios.size/4; i++) { |
874 | u32 val = be32_to_cpu(gk20a_readl(g, 0x300000 + i*4)); | 872 | u32 val = be32_to_cpu(gk20a_readl(g, 0x300000 + i*4)); |
875 | 873 | ||
@@ -878,8 +876,7 @@ static int gm206_bios_init(struct gk20a *g) | |||
878 | g->bios.data[(i*4)+2] = (val >> 8) & 0xff; | 876 | g->bios.data[(i*4)+2] = (val >> 8) & 0xff; |
879 | g->bios.data[(i*4)+3] = val & 0xff; | 877 | g->bios.data[(i*4)+3] = val & 0xff; |
880 | } | 878 | } |
881 | gk20a_writel(g, NV_PCFG + xve_rom_ctrl_r(), | 879 | g->ops.xve.enable_shadow_rom(g); |
882 | xve_rom_ctrl_rom_shadow_enabled_f()); | ||
883 | } | 880 | } |
884 | 881 | ||
885 | err = gm206_bios_parse_rom(g); | 882 | err = gm206_bios_parse_rom(g); |