summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gp106/xve_gp106.c
diff options
context:
space:
mode:
authorTerje Bergstrom <tbergstrom@nvidia.com>2017-02-09 11:32:02 -0500
committermobile promotions <svcmobile_promotions@nvidia.com>2017-02-13 12:43:09 -0500
commited35f0a4042074463bf52ba04583fde680d1d389 (patch)
tree7052337e9457e87e2829490942a7c563a742cb2f /drivers/gpu/nvgpu/gp106/xve_gp106.c
parent9af510574957fc885a4ae9f96d23c6ad464eeb8f (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/gp106/xve_gp106.c')
-rw-r--r--drivers/gpu/nvgpu/gp106/xve_gp106.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/gp106/xve_gp106.c b/drivers/gpu/nvgpu/gp106/xve_gp106.c
index 83ae9306..ecc6de60 100644
--- a/drivers/gpu/nvgpu/gp106/xve_gp106.c
+++ b/drivers/gpu/nvgpu/gp106/xve_gp106.c
@@ -25,6 +25,8 @@
25#include <nvgpu/hw/gp106/hw_xp_gp106.h> 25#include <nvgpu/hw/gp106/hw_xp_gp106.h>
26#include <nvgpu/hw/gp106/hw_xve_gp106.h> 26#include <nvgpu/hw/gp106/hw_xve_gp106.h>
27 27
28#define NV_PCFG 0x88000
29
28/** 30/**
29 * Init a timer and place the timeout data in @timeout. 31 * Init a timer and place the timeout data in @timeout.
30 */ 32 */
@@ -661,6 +663,18 @@ static void xve_rearm_msi_gp106(struct gk20a *g)
661} 663}
662#endif 664#endif
663 665
666static void xve_enable_shadow_rom_gp106(struct gk20a *g)
667{
668 g->ops.xve.xve_writel(g, NV_PCFG + xve_rom_ctrl_r(),
669 xve_rom_ctrl_rom_shadow_enabled_f());
670}
671
672static void xve_disable_shadow_rom_gp106(struct gk20a *g)
673{
674 g->ops.xve.xve_writel(g, NV_PCFG + xve_rom_ctrl_r(),
675 xve_rom_ctrl_rom_shadow_disabled_f());
676}
677
664/* 678/*
665 * Init the HAL functions and what not. xve_sw_init_gp106() is for initializing 679 * Init the HAL functions and what not. xve_sw_init_gp106() is for initializing
666 * all the other stuff like debugfs nodes, etc. 680 * all the other stuff like debugfs nodes, etc.
@@ -678,5 +692,8 @@ int gp106_init_xve_ops(struct gpu_ops *gops)
678#if defined(CONFIG_PCI_MSI) 692#if defined(CONFIG_PCI_MSI)
679 gops->xve.rearm_msi = xve_rearm_msi_gp106; 693 gops->xve.rearm_msi = xve_rearm_msi_gp106;
680#endif 694#endif
695 gops->xve.enable_shadow_rom = xve_enable_shadow_rom_gp106;
696 gops->xve.disable_shadow_rom = xve_disable_shadow_rom_gp106;
697
681 return 0; 698 return 0;
682} 699}