mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-22 17:36:20 +03:00
gpu: nvgpu: Restructure of clk_prog unit
Changes: Removed whitespaces NVGPU-1968 Change-Id: Ie1471add5500a15a2a0c564024555af0d554e473 Signed-off-by: rmylavarapu <rmylavarapu@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/2087688 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Alex Waterman <alexw@nvidia.com> Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com> Reviewed-by: svc-mobile-misra <svc-mobile-misra@nvidia.com> GVS: Gerrit_Virtual_Submit Reviewed-by: Vijayakumar Subbu <vsubbu@nvidia.com> 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
18bc110bd1
commit
5965b7ebb4
@@ -607,7 +607,8 @@ static int clk_prog_pmudatainit_35_master_table(struct gk20a *g,
|
|||||||
int status = 0;
|
int status = 0;
|
||||||
struct clk_prog_35_master_table *pclk_prog_35_master_table;
|
struct clk_prog_35_master_table *pclk_prog_35_master_table;
|
||||||
struct nv_pmu_clk_clk_prog_35_master_table_boardobj_set *pset;
|
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) *
|
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, " ");
|
nvgpu_log_info(g, " ");
|
||||||
@@ -633,8 +634,7 @@ static int _clk_prog_1x_master_rail_construct_vf_point(struct gk20a *g,
|
|||||||
struct nvgpu_clk_pmupstate *pclk,
|
struct nvgpu_clk_pmupstate *pclk,
|
||||||
struct clk_prog_1x_master *p1xmaster,
|
struct clk_prog_1x_master *p1xmaster,
|
||||||
struct ctrl_clk_clk_prog_1x_master_vf_entry *p_vf_rail,
|
struct ctrl_clk_clk_prog_1x_master_vf_entry *p_vf_rail,
|
||||||
struct clk_vf_point *p_vf_point_tmp,
|
struct clk_vf_point *p_vf_point_tmp, u8 *p_vf_point_idx)
|
||||||
u8 *p_vf_point_idx)
|
|
||||||
{
|
{
|
||||||
struct clk_vf_point *p_vf_point;
|
struct clk_vf_point *p_vf_point;
|
||||||
int status;
|
int status;
|
||||||
@@ -662,8 +662,7 @@ done:
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int clk_prog_construct_super(struct gk20a *g,
|
static int clk_prog_construct_super(struct gk20a *g,
|
||||||
struct boardobj **ppboardobj,
|
struct boardobj **ppboardobj, size_t size, void *pargs)
|
||||||
size_t size, void *pargs)
|
|
||||||
{
|
{
|
||||||
struct clk_prog *pclkprog;
|
struct clk_prog *pclkprog;
|
||||||
int status = 0;
|
int status = 0;
|
||||||
@@ -682,8 +681,7 @@ static int clk_prog_construct_super(struct gk20a *g,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static int clk_prog_construct_1x(struct gk20a *g,
|
static int clk_prog_construct_1x(struct gk20a *g, struct boardobj **ppboardobj,
|
||||||
struct boardobj **ppboardobj,
|
|
||||||
size_t size, void *pargs)
|
size_t size, void *pargs)
|
||||||
{
|
{
|
||||||
struct boardobj *ptmpobj = (struct boardobj *)pargs;
|
struct boardobj *ptmpobj = (struct boardobj *)pargs;
|
||||||
@@ -711,8 +709,7 @@ static int clk_prog_construct_1x(struct gk20a *g,
|
|||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int clk_prog_construct_35(struct gk20a *g,
|
static int clk_prog_construct_35(struct gk20a *g, struct boardobj **ppboardobj,
|
||||||
struct boardobj **ppboardobj,
|
|
||||||
size_t size, void *pargs)
|
size_t size, void *pargs)
|
||||||
{
|
{
|
||||||
struct boardobj *ptmpobj = (struct boardobj *)pargs;
|
struct boardobj *ptmpobj = (struct boardobj *)pargs;
|
||||||
@@ -741,8 +738,7 @@ static int clk_prog_construct_35(struct gk20a *g,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int clk_prog_construct_1x_master(struct gk20a *g,
|
static int clk_prog_construct_1x_master(struct gk20a *g,
|
||||||
struct boardobj **ppboardobj,
|
struct boardobj **ppboardobj, size_t size, void *pargs)
|
||||||
size_t size, void *pargs)
|
|
||||||
{
|
{
|
||||||
struct boardobj *ptmpobj = (struct boardobj *)pargs;
|
struct boardobj *ptmpobj = (struct boardobj *)pargs;
|
||||||
struct clk_prog_1x_master *pclkprog;
|
struct clk_prog_1x_master *pclkprog;
|
||||||
@@ -799,8 +795,7 @@ static int clk_prog_construct_1x_master(struct gk20a *g,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int clk_prog_construct_35_master(struct gk20a *g,
|
static int clk_prog_construct_35_master(struct gk20a *g,
|
||||||
struct boardobj **ppboardobj,
|
struct boardobj **ppboardobj, size_t size, void *pargs)
|
||||||
size_t size, void *pargs)
|
|
||||||
{
|
{
|
||||||
struct boardobj *ptmpobj = (struct boardobj *)pargs;
|
struct boardobj *ptmpobj = (struct boardobj *)pargs;
|
||||||
struct clk_prog_35_master *pclkprog;
|
struct clk_prog_35_master *pclkprog;
|
||||||
@@ -838,15 +833,15 @@ static int clk_prog_construct_35_master(struct gk20a *g,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int clk_prog_construct_35_master_ratio(struct gk20a *g,
|
static int clk_prog_construct_35_master_ratio(struct gk20a *g,
|
||||||
struct boardobj **ppboardobj,
|
struct boardobj **ppboardobj, size_t size, void *pargs)
|
||||||
size_t size, void *pargs)
|
|
||||||
{
|
{
|
||||||
struct boardobj *ptmpobj = (struct boardobj *)pargs;
|
struct boardobj *ptmpobj = (struct boardobj *)pargs;
|
||||||
struct clk_prog_35_master_ratio *pclkprog;
|
struct clk_prog_35_master_ratio *pclkprog;
|
||||||
struct clk_prog_35_master_ratio *ptmpprog =
|
struct clk_prog_35_master_ratio *ptmpprog =
|
||||||
(struct clk_prog_35_master_ratio *)pargs;
|
(struct clk_prog_35_master_ratio *)pargs;
|
||||||
int status = 0;
|
int status = 0;
|
||||||
size_t slavesize = sizeof(struct ctrl_clk_clk_prog_1x_master_ratio_slave_entry) *
|
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) {
|
if (BOARDOBJ_GET_TYPE(pargs) != CTRL_CLK_CLK_PROG_TYPE_35_MASTER_RATIO) {
|
||||||
@@ -881,15 +876,15 @@ static int clk_prog_construct_35_master_ratio(struct gk20a *g,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int clk_prog_construct_35_master_table(struct gk20a *g,
|
static int clk_prog_construct_35_master_table(struct gk20a *g,
|
||||||
struct boardobj **ppboardobj,
|
struct boardobj **ppboardobj, size_t size, void *pargs)
|
||||||
size_t size, void *pargs)
|
|
||||||
{
|
{
|
||||||
struct boardobj *ptmpobj = (struct boardobj *)pargs;
|
struct boardobj *ptmpobj = (struct boardobj *)pargs;
|
||||||
struct clk_prog_35_master_table *pclkprog;
|
struct clk_prog_35_master_table *pclkprog;
|
||||||
struct clk_prog_35_master_table *ptmpprog =
|
struct clk_prog_35_master_table *ptmpprog =
|
||||||
(struct clk_prog_35_master_table *)pargs;
|
(struct clk_prog_35_master_table *)pargs;
|
||||||
int status = 0;
|
int status = 0;
|
||||||
size_t slavesize = sizeof(struct ctrl_clk_clk_prog_1x_master_table_slave_entry) *
|
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));
|
nvgpu_log_info(g, "type - %x", BOARDOBJ_GET_TYPE(pargs));
|
||||||
@@ -1072,16 +1067,10 @@ done:
|
|||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int vflookup_prog_1x_master
|
static int vflookup_prog_1x_master(struct gk20a *g,
|
||||||
(
|
|
||||||
struct gk20a *g,
|
|
||||||
struct nvgpu_clk_pmupstate *pclk,
|
struct nvgpu_clk_pmupstate *pclk,
|
||||||
struct clk_prog_1x_master *p1xmaster,
|
struct clk_prog_1x_master *p1xmaster, u8 *slave_clk_domain,
|
||||||
u8 *slave_clk_domain,
|
u16 *pclkmhz, u32 *pvoltuv, u8 rail)
|
||||||
u16 *pclkmhz,
|
|
||||||
u32 *pvoltuv,
|
|
||||||
u8 rail
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
u32 j;
|
u32 j;
|
||||||
struct ctrl_clk_clk_prog_1x_master_vf_entry
|
struct ctrl_clk_clk_prog_1x_master_vf_entry
|
||||||
@@ -1233,15 +1222,10 @@ static int vflookup_prog_1x_master
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int getfpoints_prog_1x_master
|
static int getfpoints_prog_1x_master(struct gk20a *g,
|
||||||
(
|
|
||||||
struct gk20a *g,
|
|
||||||
struct nvgpu_clk_pmupstate *pclk,
|
struct nvgpu_clk_pmupstate *pclk,
|
||||||
struct clk_prog_1x_master *p1xmaster,
|
struct clk_prog_1x_master *p1xmaster,
|
||||||
u32 *pfpointscount,
|
u32 *pfpointscount, u16 **ppfreqpointsinmhz, u8 rail)
|
||||||
u16 **ppfreqpointsinmhz,
|
|
||||||
u8 rail
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
|
|
||||||
struct ctrl_clk_clk_prog_1x_master_vf_entry
|
struct ctrl_clk_clk_prog_1x_master_vf_entry
|
||||||
@@ -1298,9 +1282,7 @@ done:
|
|||||||
static int getslaveclk_prog_1x_master(struct gk20a *g,
|
static int getslaveclk_prog_1x_master(struct gk20a *g,
|
||||||
struct nvgpu_clk_pmupstate *pclk,
|
struct nvgpu_clk_pmupstate *pclk,
|
||||||
struct clk_prog_1x_master *p1xmaster,
|
struct clk_prog_1x_master *p1xmaster,
|
||||||
u8 slave_clk_domain,
|
u8 slave_clk_domain, u16 *pclkmhz, u16 masterclkmhz
|
||||||
u16 *pclkmhz,
|
|
||||||
u16 masterclkmhz
|
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
struct nvgpu_clk_progs *pclkprogobjs;
|
struct nvgpu_clk_progs *pclkprogobjs;
|
||||||
|
|||||||
Reference in New Issue
Block a user