gpu: nvgpu: prod programming for slcg timer unit

Added init function for common.ptimer unit and called
this init function during nvgpu early init.
int nvgpu_ptimer_init(struct gk20a *g);

Added following helper function for programming
prod values for slcg timer unit:
void nvgpu_cg_slcg_timer_load_enable(struct gk20a *g);

Invoked prod programming for slcg timer unit from
nvgpu_ptimer_init.

Jira NVGPU-6026

Change-Id: I29e32380a4d05ec8276d7ebe59bc2733917f8184
Signed-off-by: Seshendra Gadagottu <sgadagottu@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2524037
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
Seshendra Gadagottu
2021-05-03 15:12:44 -07:00
committed by mobile promotions
parent b15bd97c08
commit 85efe929ca
5 changed files with 40 additions and 1 deletions

View File

@@ -43,6 +43,9 @@
#include <nvgpu/pm_reservation.h>
#include <nvgpu/netlist.h>
#include <nvgpu/hal_init.h>
#ifdef CONFIG_NVGPU_NON_FUSA
#include <nvgpu/ptimer.h>
#endif
#ifdef CONFIG_NVGPU_LS_PMU
#include <nvgpu/pmu/pmu_pstate.h>
@@ -614,6 +617,9 @@ static int nvgpu_early_init(struct gk20a *g)
NVGPU_INIT_TABLE_ENTRY(g->ops.bus.init_hw, NO_FLAG),
NVGPU_INIT_TABLE_ENTRY(g->ops.priv_ring.enable_priv_ring,
NO_FLAG),
#ifdef CONFIG_NVGPU_NON_FUSA
NVGPU_INIT_TABLE_ENTRY(&nvgpu_ptimer_init, NO_FLAG),
#endif
/* TBD: move this after graphics init in which blcg/slcg is
* enabled. This function removes SlowdownOnBoot which applies
* 32x divider on gpcpll bypass path. The purpose of slowdown is