gpu: nvgpu: Remove clk.h dependency from gk20a.h

gk20a.h depends on definition of struct clk_pmupstate. Change that
to a pointer and use forward declaration, and allocation and free
functions.

Fix a few build breaks by adding explicit includes where previously
a header file had gotten included implicitly.

JIRA NVGPU-596

Change-Id: Iafe7d72a6fd31543653e0e10e2d2e552b6c3514b
Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1945286
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
Terje Bergstrom
2018-11-07 13:28:12 -08:00
committed by mobile promotions
parent bca27e31e3
commit 07760eb9a1
16 changed files with 124 additions and 87 deletions

View File

@@ -240,7 +240,7 @@ static int clk_get_freq_controller_table(struct gk20a *g,
(u8)BIOS_GET_FIELD(entry.param0,
NV_VBIOS_FCT_1X_ENTRY_PARAM0_ID);
pclk_domain = CLK_CLK_DOMAIN_GET((&g->clk_pmu),
pclk_domain = CLK_CLK_DOMAIN_GET((g->clk_pmu),
(u32)entry.clk_domain_idx);
freq_controller_data.freq_controller.clk_domain =
pclk_domain->api_domain;
@@ -332,7 +332,7 @@ int clk_freq_controller_pmu_setup(struct gk20a *g)
nvgpu_log_info(g, " ");
pboardobjgrp = &g->clk_pmu.clk_freq_controllers.super.super;
pboardobjgrp = &g->clk_pmu->clk_freq_controllers.super.super;
if (!pboardobjgrp->bconstructed) {
return -EINVAL;
@@ -397,7 +397,7 @@ int clk_freq_controller_sw_setup(struct gk20a *g)
int status = 0;
struct boardobjgrp *pboardobjgrp = NULL;
struct clk_freq_controllers *pclk_freq_controllers;
struct avfsfllobjs *pfllobjs = &(g->clk_pmu.avfs_fllobjs);
struct avfsfllobjs *pfllobjs = &(g->clk_pmu->avfs_fllobjs);
struct fll_device *pfll;
struct clk_freq_controller *pclkfreqctrl;
u8 i;
@@ -405,7 +405,7 @@ int clk_freq_controller_sw_setup(struct gk20a *g)
nvgpu_log_info(g, " ");
pclk_freq_controllers = &g->clk_pmu.clk_freq_controllers;
pclk_freq_controllers = &g->clk_pmu->clk_freq_controllers;
status = boardobjgrpconstruct_e32(g, &pclk_freq_controllers->super);
if (status != 0) {
nvgpu_err(g,
@@ -414,7 +414,7 @@ int clk_freq_controller_sw_setup(struct gk20a *g)
goto done;
}
pboardobjgrp = &g->clk_pmu.clk_freq_controllers.super.super;
pboardobjgrp = &g->clk_pmu->clk_freq_controllers.super.super;
pboardobjgrp->pmudatainit = _clk_freq_controllers_pmudatainit;
pboardobjgrp->pmudatainstget =