gpu: nvgpu: compile out PMU RTOS init code for safety

Compile out PMU RTOS init calls called from other unit when
PMU RTOS support is disabled for safety build by setting
NVGPU_LS_PMU build flag to 0

JIRA NVGPU-3418

Change-Id: I021a2e91883c561a35c7c87e88993f867160e8c0
Signed-off-by: Mahantesh Kumbar <mkumbar@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2124848
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: svc-mobile-misra <svc-mobile-misra@nvidia.com>
Reviewed-by: Vijayakumar Subbu <vsubbu@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
Mahantesh Kumbar
2019-05-24 12:27:13 +05:30
committed by mobile promotions
parent 120defb7cb
commit c7d854a957
2 changed files with 13 additions and 3 deletions

View File

@@ -98,10 +98,12 @@ int gk20a_prepare_poweroff(struct gk20a *g)
}
}
#ifdef NVGPU_LS_PMU
/* disable elpg before gr or fifo suspend */
if (g->support_ls_pmu) {
ret = nvgpu_pmu_destroy(g, g->pmu);
}
#endif
#ifdef NVGPU_DGPU_SUPPORT
if (nvgpu_is_enabled(g, NVGPU_SUPPORT_SEC2_RTOS)) {
@@ -383,12 +385,14 @@ int gk20a_finalize_poweron(struct gk20a *g)
}
#endif
#ifdef NVGPU_LS_PMU
err = nvgpu_pmu_init(g, g->pmu);
if (err != 0) {
nvgpu_err(g, "failed to init gk20a pmu");
nvgpu_mutex_release(&g->tpc_pg_lock);
goto done;
}
#endif
err = nvgpu_fbp_init_support(g);
if (err != 0) {
@@ -413,6 +417,7 @@ int gk20a_finalize_poweron(struct gk20a *g)
nvgpu_mutex_release(&g->tpc_pg_lock);
#ifdef NVGPU_LS_PMU
if (nvgpu_is_enabled(g, NVGPU_PMU_PSTATE)) {
err = nvgpu_pmu_pstate_sw_setup(g);
if (err != 0) {
@@ -435,7 +440,9 @@ int gk20a_finalize_poweron(struct gk20a *g)
nvgpu_err(g, "failed to set boot clk");
goto done;
}
} else {
} else
#endif
{
err = nvgpu_clk_arb_init_arbiter(g);
if (err != 0) {
nvgpu_err(g, "failed to init clk arb");