mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-23 09:57:08 +03:00
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:
committed by
mobile promotions
parent
bca27e31e3
commit
07760eb9a1
@@ -96,7 +96,7 @@ int clk_prog_sw_setup(struct gk20a *g)
|
||||
|
||||
nvgpu_log_info(g, " ");
|
||||
|
||||
status = boardobjgrpconstruct_e255(g, &g->clk_pmu.clk_progobjs.super);
|
||||
status = boardobjgrpconstruct_e255(g, &g->clk_pmu->clk_progobjs.super);
|
||||
if (status != 0) {
|
||||
nvgpu_err(g,
|
||||
"error creating boardobjgrp for clk prog, status - 0x%x",
|
||||
@@ -104,8 +104,8 @@ int clk_prog_sw_setup(struct gk20a *g)
|
||||
goto done;
|
||||
}
|
||||
|
||||
pboardobjgrp = &g->clk_pmu.clk_progobjs.super.super;
|
||||
pclkprogobjs = &(g->clk_pmu.clk_progobjs);
|
||||
pboardobjgrp = &g->clk_pmu->clk_progobjs.super.super;
|
||||
pclkprogobjs = &(g->clk_pmu->clk_progobjs);
|
||||
|
||||
BOARDOBJGRP_PMU_CONSTRUCT(pboardobjgrp, CLK, CLK_PROG);
|
||||
|
||||
@@ -127,7 +127,7 @@ int clk_prog_sw_setup(struct gk20a *g)
|
||||
goto done;
|
||||
}
|
||||
|
||||
status = clk_domain_clk_prog_link(g, &g->clk_pmu);
|
||||
status = clk_domain_clk_prog_link(g, g->clk_pmu);
|
||||
if (status != 0) {
|
||||
nvgpu_err(g, "error constructing VF point board objects");
|
||||
goto done;
|
||||
@@ -145,7 +145,7 @@ int clk_prog_pmu_setup(struct gk20a *g)
|
||||
|
||||
nvgpu_log_info(g, " ");
|
||||
|
||||
pboardobjgrp = &g->clk_pmu.clk_progobjs.super.super;
|
||||
pboardobjgrp = &g->clk_pmu->clk_progobjs.super.super;
|
||||
|
||||
if (!pboardobjgrp->bconstructed) {
|
||||
return -EINVAL;
|
||||
@@ -719,7 +719,7 @@ static int clk_prog_pmudatainit_1x_master(struct gk20a *g,
|
||||
struct clk_prog_1x_master *pclk_prog_1x_master;
|
||||
struct nv_pmu_clk_clk_prog_1x_master_boardobj_set *pset;
|
||||
size_t vfsize = sizeof(struct ctrl_clk_clk_prog_1x_master_vf_entry) *
|
||||
g->clk_pmu.clk_progobjs.vf_entry_count;
|
||||
g->clk_pmu->clk_progobjs.vf_entry_count;
|
||||
|
||||
nvgpu_log_info(g, " ");
|
||||
|
||||
@@ -752,7 +752,7 @@ static int clk_prog_pmudatainit_35_master(struct gk20a *g,
|
||||
struct nv_pmu_clk_clk_prog_35_master_boardobj_set *pset;
|
||||
size_t voltrail_sec_vfsize =
|
||||
sizeof(struct ctrl_clk_clk_prog_35_master_sec_vf_entry_voltrail)
|
||||
* g->clk_pmu.clk_progobjs.vf_sec_entry_count;
|
||||
* g->clk_pmu->clk_progobjs.vf_sec_entry_count;
|
||||
|
||||
nvgpu_log_info(g, " ");
|
||||
|
||||
@@ -779,7 +779,7 @@ static int clk_prog_pmudatainit_1x_master_ratio(struct gk20a *g,
|
||||
struct clk_prog_1x_master_ratio *pclk_prog_1x_master_ratio;
|
||||
struct nv_pmu_clk_clk_prog_1x_master_ratio_boardobj_set *pset;
|
||||
size_t slavesize = sizeof(struct ctrl_clk_clk_prog_1x_master_ratio_slave_entry) *
|
||||
g->clk_pmu.clk_progobjs.slave_entry_count;
|
||||
g->clk_pmu->clk_progobjs.slave_entry_count;
|
||||
|
||||
nvgpu_log_info(g, " ");
|
||||
|
||||
@@ -808,7 +808,7 @@ static int clk_prog_pmudatainit_35_master_ratio(struct gk20a *g,
|
||||
struct clk_prog_35_master_ratio *pclk_prog_35_master_ratio;
|
||||
struct nv_pmu_clk_clk_prog_35_master_ratio_boardobj_set *pset;
|
||||
size_t slavesize = sizeof(struct ctrl_clk_clk_prog_1x_master_ratio_slave_entry) *
|
||||
g->clk_pmu.clk_progobjs.slave_entry_count;
|
||||
g->clk_pmu->clk_progobjs.slave_entry_count;
|
||||
|
||||
nvgpu_log_info(g, " ");
|
||||
|
||||
@@ -838,7 +838,7 @@ static int clk_prog_pmudatainit_1x_master_table(struct gk20a *g,
|
||||
struct clk_prog_1x_master_table *pclk_prog_1x_master_table;
|
||||
struct nv_pmu_clk_clk_prog_1x_master_table_boardobj_set *pset;
|
||||
size_t slavesize = sizeof(struct ctrl_clk_clk_prog_1x_master_ratio_slave_entry) *
|
||||
g->clk_pmu.clk_progobjs.slave_entry_count;
|
||||
g->clk_pmu->clk_progobjs.slave_entry_count;
|
||||
|
||||
nvgpu_log_info(g, " ");
|
||||
|
||||
@@ -866,7 +866,7 @@ static int clk_prog_pmudatainit_35_master_table(struct gk20a *g,
|
||||
struct clk_prog_35_master_table *pclk_prog_35_master_table;
|
||||
struct nv_pmu_clk_clk_prog_35_master_table_boardobj_set *pset;
|
||||
size_t slavesize = sizeof(struct ctrl_clk_clk_prog_1x_master_ratio_slave_entry) *
|
||||
g->clk_pmu.clk_progobjs.slave_entry_count;
|
||||
g->clk_pmu->clk_progobjs.slave_entry_count;
|
||||
|
||||
nvgpu_log_info(g, " ");
|
||||
|
||||
@@ -1008,7 +1008,7 @@ static int clk_prog_construct_1x_master(struct gk20a *g,
|
||||
(struct clk_prog_1x_master *)pargs;
|
||||
int status = 0;
|
||||
size_t vfsize = sizeof(struct ctrl_clk_clk_prog_1x_master_vf_entry) *
|
||||
g->clk_pmu.clk_progobjs.vf_entry_count;
|
||||
g->clk_pmu->clk_progobjs.vf_entry_count;
|
||||
u8 railidx;
|
||||
|
||||
nvgpu_log_info(g, " type - %x", BOARDOBJ_GET_TYPE(pargs));
|
||||
@@ -1045,7 +1045,7 @@ static int clk_prog_construct_1x_master(struct gk20a *g,
|
||||
pclkprog->b_o_c_o_v_enabled = ptmpprog->b_o_c_o_v_enabled;
|
||||
|
||||
for (railidx = 0;
|
||||
railidx < g->clk_pmu.clk_progobjs.vf_entry_count;
|
||||
railidx < g->clk_pmu->clk_progobjs.vf_entry_count;
|
||||
railidx++) {
|
||||
pclkprog->p_vf_entries[railidx].vf_point_idx_first =
|
||||
CTRL_CLK_CLK_VF_POINT_IDX_INVALID;
|
||||
@@ -1105,7 +1105,7 @@ static int clk_prog_construct_1x_master_ratio(struct gk20a *g,
|
||||
(struct clk_prog_1x_master_ratio *)pargs;
|
||||
int status = 0;
|
||||
size_t slavesize = sizeof(struct ctrl_clk_clk_prog_1x_master_ratio_slave_entry) *
|
||||
g->clk_pmu.clk_progobjs.slave_entry_count;
|
||||
g->clk_pmu->clk_progobjs.slave_entry_count;
|
||||
|
||||
if (BOARDOBJ_GET_TYPE(pargs) != CTRL_CLK_CLK_PROG_TYPE_1X_MASTER_RATIO) {
|
||||
return -EINVAL;
|
||||
@@ -1148,7 +1148,7 @@ static int clk_prog_construct_35_master_ratio(struct gk20a *g,
|
||||
(struct clk_prog_35_master_ratio *)pargs;
|
||||
int status = 0;
|
||||
size_t slavesize = sizeof(struct ctrl_clk_clk_prog_1x_master_ratio_slave_entry) *
|
||||
g->clk_pmu.clk_progobjs.slave_entry_count;
|
||||
g->clk_pmu->clk_progobjs.slave_entry_count;
|
||||
|
||||
if (BOARDOBJ_GET_TYPE(pargs) != CTRL_CLK_CLK_PROG_TYPE_35_MASTER_RATIO) {
|
||||
return -EINVAL;
|
||||
@@ -1191,7 +1191,7 @@ static int clk_prog_construct_1x_master_table(struct gk20a *g,
|
||||
(struct clk_prog_1x_master_table *)pargs;
|
||||
int status = 0;
|
||||
size_t slavesize = sizeof(struct ctrl_clk_clk_prog_1x_master_ratio_slave_entry) *
|
||||
g->clk_pmu.clk_progobjs.slave_entry_count;
|
||||
g->clk_pmu->clk_progobjs.slave_entry_count;
|
||||
|
||||
nvgpu_log_info(g, "type - %x", BOARDOBJ_GET_TYPE(pargs));
|
||||
|
||||
@@ -1243,7 +1243,7 @@ static int clk_prog_construct_35_master_table(struct gk20a *g,
|
||||
(struct clk_prog_35_master_table *)pargs;
|
||||
int status = 0;
|
||||
size_t slavesize = sizeof(struct ctrl_clk_clk_prog_1x_master_table_slave_entry) *
|
||||
g->clk_pmu.clk_progobjs.slave_entry_count;
|
||||
g->clk_pmu->clk_progobjs.slave_entry_count;
|
||||
|
||||
nvgpu_log_info(g, "type - %x", BOARDOBJ_GET_TYPE(pargs));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user