diff options
author | Philip Elcan <pelcan@nvidia.com> | 2018-08-29 15:46:12 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2018-09-07 00:33:50 -0400 |
commit | 7f8226887c28267d3c2351692d4429ead1e17695 (patch) | |
tree | aa09c45e496b058044c9d9a94c94d9922c572285 /drivers/gpu/nvgpu/clk | |
parent | 0e58ebaae13dd59b6aba5297f898e7c89fcd2742 (diff) |
gpu: nvgpu: cleanup return types for MISRA 10.3
This is a big cleanup of return types across a number of modules in the
nvgpu driver. Many functions were returning u32 but using negative
return codes. This is a MISRA 10.3 violation by assigning signed values
to a u32.
JIRA NVGPU-647
Change-Id: I59ee66706321f5b5b1a07ed8c24b81583e9ba28c
Signed-off-by: Philip Elcan <pelcan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1810743
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/clk')
-rw-r--r-- | drivers/gpu/nvgpu/clk/clk_domain.c | 86 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/clk/clk_domain.h | 8 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/clk/clk_fll.c | 30 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/clk/clk_fll.h | 5 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/clk/clk_freq_controller.c | 36 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/clk/clk_freq_controller.h | 6 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/clk/clk_prog.c | 60 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/clk/clk_prog.h | 6 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/clk/clk_vf_point.c | 48 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/clk/clk_vf_point.h | 6 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/clk/clk_vin.c | 60 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/clk/clk_vin.h | 4 |
12 files changed, 177 insertions, 178 deletions
diff --git a/drivers/gpu/nvgpu/clk/clk_domain.c b/drivers/gpu/nvgpu/clk/clk_domain.c index 9f17d199..c0445e5c 100644 --- a/drivers/gpu/nvgpu/clk/clk_domain.c +++ b/drivers/gpu/nvgpu/clk/clk_domain.c | |||
@@ -33,10 +33,10 @@ | |||
33 | 33 | ||
34 | static struct clk_domain *construct_clk_domain(struct gk20a *g, void *pargs); | 34 | static struct clk_domain *construct_clk_domain(struct gk20a *g, void *pargs); |
35 | 35 | ||
36 | static u32 devinit_get_clocks_table(struct gk20a *g, | 36 | static int devinit_get_clocks_table(struct gk20a *g, |
37 | struct clk_domains *pdomainobjs); | 37 | struct clk_domains *pdomainobjs); |
38 | 38 | ||
39 | static u32 clk_domain_pmudatainit_super(struct gk20a *g, struct boardobj | 39 | static int clk_domain_pmudatainit_super(struct gk20a *g, struct boardobj |
40 | *board_obj_ptr, struct nv_pmu_boardobj *ppmudata); | 40 | *board_obj_ptr, struct nv_pmu_boardobj *ppmudata); |
41 | 41 | ||
42 | static struct vbios_clocks_table_1x_hal_clock_entry | 42 | static struct vbios_clocks_table_1x_hal_clock_entry |
@@ -120,7 +120,7 @@ static u32 clktranslatehalmumsettoapinumset(u32 clkhaldomains) | |||
120 | return clkapidomains; | 120 | return clkapidomains; |
121 | } | 121 | } |
122 | 122 | ||
123 | static u32 _clk_domains_pmudatainit_3x(struct gk20a *g, | 123 | static int _clk_domains_pmudatainit_3x(struct gk20a *g, |
124 | struct boardobjgrp *pboardobjgrp, | 124 | struct boardobjgrp *pboardobjgrp, |
125 | struct nv_pmu_boardobjgrp_super *pboardobjgrppmu) | 125 | struct nv_pmu_boardobjgrp_super *pboardobjgrppmu) |
126 | { | 126 | { |
@@ -128,7 +128,7 @@ static u32 _clk_domains_pmudatainit_3x(struct gk20a *g, | |||
128 | (struct nv_pmu_clk_clk_domain_boardobjgrp_set_header *) | 128 | (struct nv_pmu_clk_clk_domain_boardobjgrp_set_header *) |
129 | pboardobjgrppmu; | 129 | pboardobjgrppmu; |
130 | struct clk_domains *pdomains = (struct clk_domains *)pboardobjgrp; | 130 | struct clk_domains *pdomains = (struct clk_domains *)pboardobjgrp; |
131 | u32 status = 0; | 131 | int status = 0; |
132 | 132 | ||
133 | status = boardobjgrp_pmudatainit_e32(g, pboardobjgrp, pboardobjgrppmu); | 133 | status = boardobjgrp_pmudatainit_e32(g, pboardobjgrp, pboardobjgrppmu); |
134 | if (status) { | 134 | if (status) { |
@@ -162,7 +162,7 @@ done: | |||
162 | return status; | 162 | return status; |
163 | } | 163 | } |
164 | 164 | ||
165 | static u32 _clk_domains_pmudata_instget(struct gk20a *g, | 165 | static int _clk_domains_pmudata_instget(struct gk20a *g, |
166 | struct nv_pmu_boardobjgrp *pmuboardobjgrp, | 166 | struct nv_pmu_boardobjgrp *pmuboardobjgrp, |
167 | struct nv_pmu_boardobj **ppboardobjpmudata, | 167 | struct nv_pmu_boardobj **ppboardobjpmudata, |
168 | u8 idx) | 168 | u8 idx) |
@@ -185,9 +185,9 @@ static u32 _clk_domains_pmudata_instget(struct gk20a *g, | |||
185 | return 0; | 185 | return 0; |
186 | } | 186 | } |
187 | 187 | ||
188 | u32 clk_domain_sw_setup(struct gk20a *g) | 188 | int clk_domain_sw_setup(struct gk20a *g) |
189 | { | 189 | { |
190 | u32 status; | 190 | int status; |
191 | struct boardobjgrp *pboardobjgrp = NULL; | 191 | struct boardobjgrp *pboardobjgrp = NULL; |
192 | struct clk_domains *pclkdomainobjs; | 192 | struct clk_domains *pclkdomainobjs; |
193 | struct clk_domain *pdomain; | 193 | struct clk_domain *pdomain; |
@@ -281,9 +281,9 @@ done: | |||
281 | return status; | 281 | return status; |
282 | } | 282 | } |
283 | 283 | ||
284 | u32 clk_domain_pmu_setup(struct gk20a *g) | 284 | int clk_domain_pmu_setup(struct gk20a *g) |
285 | { | 285 | { |
286 | u32 status; | 286 | int status; |
287 | struct boardobjgrp *pboardobjgrp = NULL; | 287 | struct boardobjgrp *pboardobjgrp = NULL; |
288 | 288 | ||
289 | nvgpu_log_info(g, " "); | 289 | nvgpu_log_info(g, " "); |
@@ -300,10 +300,10 @@ u32 clk_domain_pmu_setup(struct gk20a *g) | |||
300 | return status; | 300 | return status; |
301 | } | 301 | } |
302 | 302 | ||
303 | static u32 devinit_get_clocks_table(struct gk20a *g, | 303 | static int devinit_get_clocks_table(struct gk20a *g, |
304 | struct clk_domains *pclkdomainobjs) | 304 | struct clk_domains *pclkdomainobjs) |
305 | { | 305 | { |
306 | u32 status = 0; | 306 | int status = 0; |
307 | u8 *clocks_table_ptr = NULL; | 307 | u8 *clocks_table_ptr = NULL; |
308 | struct vbios_clocks_table_1x_header clocks_table_header = { 0 }; | 308 | struct vbios_clocks_table_1x_header clocks_table_header = { 0 }; |
309 | struct vbios_clocks_table_1x_entry clocks_table_entry = { 0 }; | 309 | struct vbios_clocks_table_1x_entry clocks_table_entry = { 0 }; |
@@ -486,7 +486,7 @@ done: | |||
486 | return status; | 486 | return status; |
487 | } | 487 | } |
488 | 488 | ||
489 | static u32 clkdomainclkproglink_not_supported(struct gk20a *g, | 489 | static int clkdomainclkproglink_not_supported(struct gk20a *g, |
490 | struct clk_pmupstate *pclk, | 490 | struct clk_pmupstate *pclk, |
491 | struct clk_domain *pdomain) | 491 | struct clk_domain *pdomain) |
492 | { | 492 | { |
@@ -520,13 +520,13 @@ static u32 clkdomaingetfpoints_stub( | |||
520 | } | 520 | } |
521 | 521 | ||
522 | 522 | ||
523 | static u32 clk_domain_construct_super(struct gk20a *g, | 523 | static int clk_domain_construct_super(struct gk20a *g, |
524 | struct boardobj **ppboardobj, | 524 | struct boardobj **ppboardobj, |
525 | u16 size, void *pargs) | 525 | u16 size, void *pargs) |
526 | { | 526 | { |
527 | struct clk_domain *pdomain; | 527 | struct clk_domain *pdomain; |
528 | struct clk_domain *ptmpdomain = (struct clk_domain *)pargs; | 528 | struct clk_domain *ptmpdomain = (struct clk_domain *)pargs; |
529 | u32 status = 0; | 529 | int status = 0; |
530 | 530 | ||
531 | status = boardobj_construct_super(g, ppboardobj, | 531 | status = boardobj_construct_super(g, ppboardobj, |
532 | size, pargs); | 532 | size, pargs); |
@@ -557,11 +557,11 @@ static u32 clk_domain_construct_super(struct gk20a *g, | |||
557 | return status; | 557 | return status; |
558 | } | 558 | } |
559 | 559 | ||
560 | static u32 _clk_domain_pmudatainit_3x(struct gk20a *g, | 560 | static int _clk_domain_pmudatainit_3x(struct gk20a *g, |
561 | struct boardobj *board_obj_ptr, | 561 | struct boardobj *board_obj_ptr, |
562 | struct nv_pmu_boardobj *ppmudata) | 562 | struct nv_pmu_boardobj *ppmudata) |
563 | { | 563 | { |
564 | u32 status = 0; | 564 | int status = 0; |
565 | struct clk_domain_3x *pclk_domain_3x; | 565 | struct clk_domain_3x *pclk_domain_3x; |
566 | struct nv_pmu_clk_clk_domain_3x_boardobj_set *pset; | 566 | struct nv_pmu_clk_clk_domain_3x_boardobj_set *pset; |
567 | 567 | ||
@@ -581,7 +581,7 @@ static u32 _clk_domain_pmudatainit_3x(struct gk20a *g, | |||
581 | return status; | 581 | return status; |
582 | } | 582 | } |
583 | 583 | ||
584 | static u32 clk_domain_construct_3x(struct gk20a *g, | 584 | static int clk_domain_construct_3x(struct gk20a *g, |
585 | struct boardobj **ppboardobj, | 585 | struct boardobj **ppboardobj, |
586 | u16 size, void *pargs) | 586 | u16 size, void *pargs) |
587 | { | 587 | { |
@@ -589,7 +589,7 @@ static u32 clk_domain_construct_3x(struct gk20a *g, | |||
589 | struct clk_domain_3x *pdomain; | 589 | struct clk_domain_3x *pdomain; |
590 | struct clk_domain_3x *ptmpdomain = | 590 | struct clk_domain_3x *ptmpdomain = |
591 | (struct clk_domain_3x *)pargs; | 591 | (struct clk_domain_3x *)pargs; |
592 | u32 status = 0; | 592 | int status = 0; |
593 | 593 | ||
594 | ptmpobj->type_mask = BIT(CTRL_CLK_CLK_DOMAIN_TYPE_3X); | 594 | ptmpobj->type_mask = BIT(CTRL_CLK_CLK_DOMAIN_TYPE_3X); |
595 | status = clk_domain_construct_super(g, ppboardobj, | 595 | status = clk_domain_construct_super(g, ppboardobj, |
@@ -608,11 +608,11 @@ static u32 clk_domain_construct_3x(struct gk20a *g, | |||
608 | return status; | 608 | return status; |
609 | } | 609 | } |
610 | 610 | ||
611 | static u32 clkdomainclkproglink_3x_prog(struct gk20a *g, | 611 | static int clkdomainclkproglink_3x_prog(struct gk20a *g, |
612 | struct clk_pmupstate *pclk, | 612 | struct clk_pmupstate *pclk, |
613 | struct clk_domain *pdomain) | 613 | struct clk_domain *pdomain) |
614 | { | 614 | { |
615 | u32 status = 0; | 615 | int status = 0; |
616 | struct clk_domain_3x_prog *p3xprog = | 616 | struct clk_domain_3x_prog *p3xprog = |
617 | (struct clk_domain_3x_prog *)pdomain; | 617 | (struct clk_domain_3x_prog *)pdomain; |
618 | struct clk_prog *pprog = NULL; | 618 | struct clk_prog *pprog = NULL; |
@@ -822,11 +822,11 @@ done: | |||
822 | return status; | 822 | return status; |
823 | } | 823 | } |
824 | 824 | ||
825 | static u32 _clk_domain_pmudatainit_3x_prog(struct gk20a *g, | 825 | static int _clk_domain_pmudatainit_3x_prog(struct gk20a *g, |
826 | struct boardobj *board_obj_ptr, | 826 | struct boardobj *board_obj_ptr, |
827 | struct nv_pmu_boardobj *ppmudata) | 827 | struct nv_pmu_boardobj *ppmudata) |
828 | { | 828 | { |
829 | u32 status = 0; | 829 | int status = 0; |
830 | struct clk_domain_3x_prog *pclk_domain_3x_prog; | 830 | struct clk_domain_3x_prog *pclk_domain_3x_prog; |
831 | struct nv_pmu_clk_clk_domain_3x_prog_boardobj_set *pset; | 831 | struct nv_pmu_clk_clk_domain_3x_prog_boardobj_set *pset; |
832 | struct clk_domains *pdomains = &(g->clk_pmu.clk_domainobjs); | 832 | struct clk_domains *pdomains = &(g->clk_pmu.clk_domainobjs); |
@@ -860,7 +860,7 @@ static u32 _clk_domain_pmudatainit_3x_prog(struct gk20a *g, | |||
860 | return status; | 860 | return status; |
861 | } | 861 | } |
862 | 862 | ||
863 | static u32 clk_domain_construct_3x_prog(struct gk20a *g, | 863 | static int clk_domain_construct_3x_prog(struct gk20a *g, |
864 | struct boardobj **ppboardobj, | 864 | struct boardobj **ppboardobj, |
865 | u16 size, void *pargs) | 865 | u16 size, void *pargs) |
866 | { | 866 | { |
@@ -868,7 +868,7 @@ static u32 clk_domain_construct_3x_prog(struct gk20a *g, | |||
868 | struct clk_domain_3x_prog *pdomain; | 868 | struct clk_domain_3x_prog *pdomain; |
869 | struct clk_domain_3x_prog *ptmpdomain = | 869 | struct clk_domain_3x_prog *ptmpdomain = |
870 | (struct clk_domain_3x_prog *)pargs; | 870 | (struct clk_domain_3x_prog *)pargs; |
871 | u32 status = 0; | 871 | int status = 0; |
872 | 872 | ||
873 | ptmpobj->type_mask |= BIT(CTRL_CLK_CLK_DOMAIN_TYPE_3X_PROG); | 873 | ptmpobj->type_mask |= BIT(CTRL_CLK_CLK_DOMAIN_TYPE_3X_PROG); |
874 | status = clk_domain_construct_3x(g, ppboardobj, size, pargs); | 874 | status = clk_domain_construct_3x(g, ppboardobj, size, pargs); |
@@ -905,11 +905,11 @@ static u32 clk_domain_construct_3x_prog(struct gk20a *g, | |||
905 | return status; | 905 | return status; |
906 | } | 906 | } |
907 | 907 | ||
908 | static u32 _clk_domain_pmudatainit_3x_slave(struct gk20a *g, | 908 | static int _clk_domain_pmudatainit_3x_slave(struct gk20a *g, |
909 | struct boardobj *board_obj_ptr, | 909 | struct boardobj *board_obj_ptr, |
910 | struct nv_pmu_boardobj *ppmudata) | 910 | struct nv_pmu_boardobj *ppmudata) |
911 | { | 911 | { |
912 | u32 status = 0; | 912 | int status = 0; |
913 | struct clk_domain_3x_slave *pclk_domain_3x_slave; | 913 | struct clk_domain_3x_slave *pclk_domain_3x_slave; |
914 | struct nv_pmu_clk_clk_domain_3x_slave_boardobj_set *pset; | 914 | struct nv_pmu_clk_clk_domain_3x_slave_boardobj_set *pset; |
915 | 915 | ||
@@ -930,7 +930,7 @@ static u32 _clk_domain_pmudatainit_3x_slave(struct gk20a *g, | |||
930 | return status; | 930 | return status; |
931 | } | 931 | } |
932 | 932 | ||
933 | static u32 clk_domain_construct_3x_slave(struct gk20a *g, | 933 | static int clk_domain_construct_3x_slave(struct gk20a *g, |
934 | struct boardobj **ppboardobj, | 934 | struct boardobj **ppboardobj, |
935 | u16 size, void *pargs) | 935 | u16 size, void *pargs) |
936 | { | 936 | { |
@@ -938,7 +938,7 @@ static u32 clk_domain_construct_3x_slave(struct gk20a *g, | |||
938 | struct clk_domain_3x_slave *pdomain; | 938 | struct clk_domain_3x_slave *pdomain; |
939 | struct clk_domain_3x_slave *ptmpdomain = | 939 | struct clk_domain_3x_slave *ptmpdomain = |
940 | (struct clk_domain_3x_slave *)pargs; | 940 | (struct clk_domain_3x_slave *)pargs; |
941 | u32 status = 0; | 941 | int status = 0; |
942 | 942 | ||
943 | if (BOARDOBJ_GET_TYPE(pargs) != CTRL_CLK_CLK_DOMAIN_TYPE_3X_SLAVE) { | 943 | if (BOARDOBJ_GET_TYPE(pargs) != CTRL_CLK_CLK_DOMAIN_TYPE_3X_SLAVE) { |
944 | return -EINVAL; | 944 | return -EINVAL; |
@@ -963,11 +963,11 @@ static u32 clk_domain_construct_3x_slave(struct gk20a *g, | |||
963 | return status; | 963 | return status; |
964 | } | 964 | } |
965 | 965 | ||
966 | static u32 clkdomainclkproglink_3x_master(struct gk20a *g, | 966 | static int clkdomainclkproglink_3x_master(struct gk20a *g, |
967 | struct clk_pmupstate *pclk, | 967 | struct clk_pmupstate *pclk, |
968 | struct clk_domain *pdomain) | 968 | struct clk_domain *pdomain) |
969 | { | 969 | { |
970 | u32 status = 0; | 970 | int status = 0; |
971 | struct clk_domain_3x_master *p3xmaster = | 971 | struct clk_domain_3x_master *p3xmaster = |
972 | (struct clk_domain_3x_master *)pdomain; | 972 | (struct clk_domain_3x_master *)pdomain; |
973 | struct clk_prog *pprog = NULL; | 973 | struct clk_prog *pprog = NULL; |
@@ -1007,11 +1007,11 @@ done: | |||
1007 | return status; | 1007 | return status; |
1008 | } | 1008 | } |
1009 | 1009 | ||
1010 | static u32 _clk_domain_pmudatainit_3x_master(struct gk20a *g, | 1010 | static int _clk_domain_pmudatainit_3x_master(struct gk20a *g, |
1011 | struct boardobj *board_obj_ptr, | 1011 | struct boardobj *board_obj_ptr, |
1012 | struct nv_pmu_boardobj *ppmudata) | 1012 | struct nv_pmu_boardobj *ppmudata) |
1013 | { | 1013 | { |
1014 | u32 status = 0; | 1014 | int status = 0; |
1015 | struct clk_domain_3x_master *pclk_domain_3x_master; | 1015 | struct clk_domain_3x_master *pclk_domain_3x_master; |
1016 | struct nv_pmu_clk_clk_domain_3x_master_boardobj_set *pset; | 1016 | struct nv_pmu_clk_clk_domain_3x_master_boardobj_set *pset; |
1017 | 1017 | ||
@@ -1032,13 +1032,13 @@ static u32 _clk_domain_pmudatainit_3x_master(struct gk20a *g, | |||
1032 | return status; | 1032 | return status; |
1033 | } | 1033 | } |
1034 | 1034 | ||
1035 | static u32 clk_domain_construct_3x_master(struct gk20a *g, | 1035 | static int clk_domain_construct_3x_master(struct gk20a *g, |
1036 | struct boardobj **ppboardobj, | 1036 | struct boardobj **ppboardobj, |
1037 | u16 size, void *pargs) | 1037 | u16 size, void *pargs) |
1038 | { | 1038 | { |
1039 | struct boardobj *ptmpobj = (struct boardobj *)pargs; | 1039 | struct boardobj *ptmpobj = (struct boardobj *)pargs; |
1040 | struct clk_domain_3x_master *pdomain; | 1040 | struct clk_domain_3x_master *pdomain; |
1041 | u32 status = 0; | 1041 | int status = 0; |
1042 | 1042 | ||
1043 | if (BOARDOBJ_GET_TYPE(pargs) != CTRL_CLK_CLK_DOMAIN_TYPE_3X_MASTER) { | 1043 | if (BOARDOBJ_GET_TYPE(pargs) != CTRL_CLK_CLK_DOMAIN_TYPE_3X_MASTER) { |
1044 | return -EINVAL; | 1044 | return -EINVAL; |
@@ -1062,7 +1062,7 @@ static u32 clk_domain_construct_3x_master(struct gk20a *g, | |||
1062 | return status; | 1062 | return status; |
1063 | } | 1063 | } |
1064 | 1064 | ||
1065 | static u32 clkdomainclkproglink_fixed(struct gk20a *g, | 1065 | static int clkdomainclkproglink_fixed(struct gk20a *g, |
1066 | struct clk_pmupstate *pclk, | 1066 | struct clk_pmupstate *pclk, |
1067 | struct clk_domain *pdomain) | 1067 | struct clk_domain *pdomain) |
1068 | { | 1068 | { |
@@ -1070,11 +1070,11 @@ static u32 clkdomainclkproglink_fixed(struct gk20a *g, | |||
1070 | return 0; | 1070 | return 0; |
1071 | } | 1071 | } |
1072 | 1072 | ||
1073 | static u32 _clk_domain_pmudatainit_3x_fixed(struct gk20a *g, | 1073 | static int _clk_domain_pmudatainit_3x_fixed(struct gk20a *g, |
1074 | struct boardobj *board_obj_ptr, | 1074 | struct boardobj *board_obj_ptr, |
1075 | struct nv_pmu_boardobj *ppmudata) | 1075 | struct nv_pmu_boardobj *ppmudata) |
1076 | { | 1076 | { |
1077 | u32 status = 0; | 1077 | int status = 0; |
1078 | struct clk_domain_3x_fixed *pclk_domain_3x_fixed; | 1078 | struct clk_domain_3x_fixed *pclk_domain_3x_fixed; |
1079 | struct nv_pmu_clk_clk_domain_3x_fixed_boardobj_set *pset; | 1079 | struct nv_pmu_clk_clk_domain_3x_fixed_boardobj_set *pset; |
1080 | 1080 | ||
@@ -1095,7 +1095,7 @@ static u32 _clk_domain_pmudatainit_3x_fixed(struct gk20a *g, | |||
1095 | return status; | 1095 | return status; |
1096 | } | 1096 | } |
1097 | 1097 | ||
1098 | static u32 clk_domain_construct_3x_fixed(struct gk20a *g, | 1098 | static int clk_domain_construct_3x_fixed(struct gk20a *g, |
1099 | struct boardobj **ppboardobj, | 1099 | struct boardobj **ppboardobj, |
1100 | u16 size, void *pargs) | 1100 | u16 size, void *pargs) |
1101 | { | 1101 | { |
@@ -1103,7 +1103,7 @@ static u32 clk_domain_construct_3x_fixed(struct gk20a *g, | |||
1103 | struct clk_domain_3x_fixed *pdomain; | 1103 | struct clk_domain_3x_fixed *pdomain; |
1104 | struct clk_domain_3x_fixed *ptmpdomain = | 1104 | struct clk_domain_3x_fixed *ptmpdomain = |
1105 | (struct clk_domain_3x_fixed *)pargs; | 1105 | (struct clk_domain_3x_fixed *)pargs; |
1106 | u32 status = 0; | 1106 | int status = 0; |
1107 | 1107 | ||
1108 | if (BOARDOBJ_GET_TYPE(pargs) != CTRL_CLK_CLK_DOMAIN_TYPE_3X_FIXED) { | 1108 | if (BOARDOBJ_GET_TYPE(pargs) != CTRL_CLK_CLK_DOMAIN_TYPE_3X_FIXED) { |
1109 | return -EINVAL; | 1109 | return -EINVAL; |
@@ -1163,11 +1163,11 @@ static struct clk_domain *construct_clk_domain(struct gk20a *g, void *pargs) | |||
1163 | return (struct clk_domain *)board_obj_ptr; | 1163 | return (struct clk_domain *)board_obj_ptr; |
1164 | } | 1164 | } |
1165 | 1165 | ||
1166 | static u32 clk_domain_pmudatainit_super(struct gk20a *g, | 1166 | static int clk_domain_pmudatainit_super(struct gk20a *g, |
1167 | struct boardobj *board_obj_ptr, | 1167 | struct boardobj *board_obj_ptr, |
1168 | struct nv_pmu_boardobj *ppmudata) | 1168 | struct nv_pmu_boardobj *ppmudata) |
1169 | { | 1169 | { |
1170 | u32 status = 0; | 1170 | int status = 0; |
1171 | struct clk_domain *pclk_domain; | 1171 | struct clk_domain *pclk_domain; |
1172 | struct nv_pmu_clk_clk_domain_boardobj_set *pset; | 1172 | struct nv_pmu_clk_clk_domain_boardobj_set *pset; |
1173 | 1173 | ||
@@ -1189,9 +1189,9 @@ static u32 clk_domain_pmudatainit_super(struct gk20a *g, | |||
1189 | return status; | 1189 | return status; |
1190 | } | 1190 | } |
1191 | 1191 | ||
1192 | u32 clk_domain_clk_prog_link(struct gk20a *g, struct clk_pmupstate *pclk) | 1192 | int clk_domain_clk_prog_link(struct gk20a *g, struct clk_pmupstate *pclk) |
1193 | { | 1193 | { |
1194 | u32 status = 0; | 1194 | int status = 0; |
1195 | struct clk_domain *pdomain; | 1195 | struct clk_domain *pdomain; |
1196 | u8 i; | 1196 | u8 i; |
1197 | 1197 | ||
diff --git a/drivers/gpu/nvgpu/clk/clk_domain.h b/drivers/gpu/nvgpu/clk/clk_domain.h index 4441e7a1..d0170339 100644 --- a/drivers/gpu/nvgpu/clk/clk_domain.h +++ b/drivers/gpu/nvgpu/clk/clk_domain.h | |||
@@ -38,10 +38,10 @@ struct clk_domain; | |||
38 | enum nv_pmu_clk_clkwhich; | 38 | enum nv_pmu_clk_clkwhich; |
39 | 39 | ||
40 | /*data and function definition to talk to driver*/ | 40 | /*data and function definition to talk to driver*/ |
41 | u32 clk_domain_sw_setup(struct gk20a *g); | 41 | int clk_domain_sw_setup(struct gk20a *g); |
42 | u32 clk_domain_pmu_setup(struct gk20a *g); | 42 | int clk_domain_pmu_setup(struct gk20a *g); |
43 | 43 | ||
44 | typedef u32 clkproglink(struct gk20a *g, struct clk_pmupstate *pclk, | 44 | typedef int clkproglink(struct gk20a *g, struct clk_pmupstate *pclk, |
45 | struct clk_domain *pdomain); | 45 | struct clk_domain *pdomain); |
46 | 46 | ||
47 | typedef int clkvfsearch(struct gk20a *g, struct clk_pmupstate *pclk, | 47 | typedef int clkvfsearch(struct gk20a *g, struct clk_pmupstate *pclk, |
@@ -123,7 +123,7 @@ struct clk_domain_3x_slave { | |||
123 | clkgetslaveclk *clkdomainclkgetslaveclk; | 123 | clkgetslaveclk *clkdomainclkgetslaveclk; |
124 | }; | 124 | }; |
125 | 125 | ||
126 | u32 clk_domain_clk_prog_link(struct gk20a *g, struct clk_pmupstate *pclk); | 126 | int clk_domain_clk_prog_link(struct gk20a *g, struct clk_pmupstate *pclk); |
127 | 127 | ||
128 | #define CLK_CLK_DOMAIN_GET(pclk, idx) \ | 128 | #define CLK_CLK_DOMAIN_GET(pclk, idx) \ |
129 | ((struct clk_domain *)BOARDOBJGRP_OBJ_GET_BY_IDX( \ | 129 | ((struct clk_domain *)BOARDOBJGRP_OBJ_GET_BY_IDX( \ |
diff --git a/drivers/gpu/nvgpu/clk/clk_fll.c b/drivers/gpu/nvgpu/clk/clk_fll.c index 0fd9c33f..700aeb2d 100644 --- a/drivers/gpu/nvgpu/clk/clk_fll.c +++ b/drivers/gpu/nvgpu/clk/clk_fll.c | |||
@@ -31,15 +31,15 @@ | |||
31 | #include "ctrl/ctrlclk.h" | 31 | #include "ctrl/ctrlclk.h" |
32 | #include "ctrl/ctrlvolt.h" | 32 | #include "ctrl/ctrlvolt.h" |
33 | 33 | ||
34 | static u32 devinit_get_fll_device_table(struct gk20a *g, | 34 | static int devinit_get_fll_device_table(struct gk20a *g, |
35 | struct avfsfllobjs *pfllobjs); | 35 | struct avfsfllobjs *pfllobjs); |
36 | static struct fll_device *construct_fll_device(struct gk20a *g, | 36 | static struct fll_device *construct_fll_device(struct gk20a *g, |
37 | void *pargs); | 37 | void *pargs); |
38 | static u32 fll_device_init_pmudata_super(struct gk20a *g, | 38 | static int fll_device_init_pmudata_super(struct gk20a *g, |
39 | struct boardobj *board_obj_ptr, | 39 | struct boardobj *board_obj_ptr, |
40 | struct nv_pmu_boardobj *ppmudata); | 40 | struct nv_pmu_boardobj *ppmudata); |
41 | 41 | ||
42 | static u32 _clk_fll_devgrp_pmudatainit_super(struct gk20a *g, | 42 | static int _clk_fll_devgrp_pmudatainit_super(struct gk20a *g, |
43 | struct boardobjgrp *pboardobjgrp, | 43 | struct boardobjgrp *pboardobjgrp, |
44 | struct nv_pmu_boardobjgrp_super *pboardobjgrppmu) | 44 | struct nv_pmu_boardobjgrp_super *pboardobjgrppmu) |
45 | { | 45 | { |
@@ -48,7 +48,7 @@ static u32 _clk_fll_devgrp_pmudatainit_super(struct gk20a *g, | |||
48 | pboardobjgrppmu; | 48 | pboardobjgrppmu; |
49 | struct avfsfllobjs *pfll_objs = (struct avfsfllobjs *) | 49 | struct avfsfllobjs *pfll_objs = (struct avfsfllobjs *) |
50 | pboardobjgrp; | 50 | pboardobjgrp; |
51 | u32 status = 0; | 51 | int status = 0; |
52 | 52 | ||
53 | nvgpu_log_info(g, " "); | 53 | nvgpu_log_info(g, " "); |
54 | 54 | ||
@@ -71,7 +71,7 @@ static u32 _clk_fll_devgrp_pmudatainit_super(struct gk20a *g, | |||
71 | return status; | 71 | return status; |
72 | } | 72 | } |
73 | 73 | ||
74 | static u32 _clk_fll_devgrp_pmudata_instget(struct gk20a *g, | 74 | static int _clk_fll_devgrp_pmudata_instget(struct gk20a *g, |
75 | struct nv_pmu_boardobjgrp *pmuboardobjgrp, | 75 | struct nv_pmu_boardobjgrp *pmuboardobjgrp, |
76 | struct nv_pmu_boardobj **ppboardobjpmudata, | 76 | struct nv_pmu_boardobj **ppboardobjpmudata, |
77 | u8 idx) | 77 | u8 idx) |
@@ -94,7 +94,7 @@ static u32 _clk_fll_devgrp_pmudata_instget(struct gk20a *g, | |||
94 | return 0; | 94 | return 0; |
95 | } | 95 | } |
96 | 96 | ||
97 | static u32 _clk_fll_devgrp_pmustatus_instget(struct gk20a *g, | 97 | static int _clk_fll_devgrp_pmustatus_instget(struct gk20a *g, |
98 | void *pboardobjgrppmu, | 98 | void *pboardobjgrppmu, |
99 | struct nv_pmu_boardobj_query **ppboardobjpmustatus, | 99 | struct nv_pmu_boardobj_query **ppboardobjpmustatus, |
100 | u8 idx) | 100 | u8 idx) |
@@ -114,9 +114,9 @@ static u32 _clk_fll_devgrp_pmustatus_instget(struct gk20a *g, | |||
114 | return 0; | 114 | return 0; |
115 | } | 115 | } |
116 | 116 | ||
117 | u32 clk_fll_sw_setup(struct gk20a *g) | 117 | int clk_fll_sw_setup(struct gk20a *g) |
118 | { | 118 | { |
119 | u32 status; | 119 | int status; |
120 | struct boardobjgrp *pboardobjgrp = NULL; | 120 | struct boardobjgrp *pboardobjgrp = NULL; |
121 | struct avfsfllobjs *pfllobjs; | 121 | struct avfsfllobjs *pfllobjs; |
122 | struct fll_device *pfll; | 122 | struct fll_device *pfll; |
@@ -209,9 +209,9 @@ done: | |||
209 | return status; | 209 | return status; |
210 | } | 210 | } |
211 | 211 | ||
212 | u32 clk_fll_pmu_setup(struct gk20a *g) | 212 | int clk_fll_pmu_setup(struct gk20a *g) |
213 | { | 213 | { |
214 | u32 status; | 214 | int status; |
215 | struct boardobjgrp *pboardobjgrp = NULL; | 215 | struct boardobjgrp *pboardobjgrp = NULL; |
216 | 216 | ||
217 | nvgpu_log_info(g, " "); | 217 | nvgpu_log_info(g, " "); |
@@ -228,10 +228,10 @@ u32 clk_fll_pmu_setup(struct gk20a *g) | |||
228 | return status; | 228 | return status; |
229 | } | 229 | } |
230 | 230 | ||
231 | static u32 devinit_get_fll_device_table(struct gk20a *g, | 231 | static int devinit_get_fll_device_table(struct gk20a *g, |
232 | struct avfsfllobjs *pfllobjs) | 232 | struct avfsfllobjs *pfllobjs) |
233 | { | 233 | { |
234 | u32 status = 0; | 234 | int status = 0; |
235 | u8 *fll_table_ptr = NULL; | 235 | u8 *fll_table_ptr = NULL; |
236 | struct fll_descriptor_header fll_desc_table_header_sz = { 0 }; | 236 | struct fll_descriptor_header fll_desc_table_header_sz = { 0 }; |
237 | struct fll_descriptor_header_10 fll_desc_table_header = { 0 }; | 237 | struct fll_descriptor_header_10 fll_desc_table_header = { 0 }; |
@@ -411,7 +411,7 @@ static struct fll_device *construct_fll_device(struct gk20a *g, | |||
411 | struct boardobj *board_obj_ptr = NULL; | 411 | struct boardobj *board_obj_ptr = NULL; |
412 | struct fll_device *pfll_dev; | 412 | struct fll_device *pfll_dev; |
413 | struct fll_device *board_obj_fll_ptr = NULL; | 413 | struct fll_device *board_obj_fll_ptr = NULL; |
414 | u32 status; | 414 | int status; |
415 | 415 | ||
416 | nvgpu_log_info(g, " "); | 416 | nvgpu_log_info(g, " "); |
417 | status = boardobj_construct_super(g, &board_obj_ptr, | 417 | status = boardobj_construct_super(g, &board_obj_ptr, |
@@ -449,11 +449,11 @@ static struct fll_device *construct_fll_device(struct gk20a *g, | |||
449 | return (struct fll_device *)board_obj_ptr; | 449 | return (struct fll_device *)board_obj_ptr; |
450 | } | 450 | } |
451 | 451 | ||
452 | static u32 fll_device_init_pmudata_super(struct gk20a *g, | 452 | static int fll_device_init_pmudata_super(struct gk20a *g, |
453 | struct boardobj *board_obj_ptr, | 453 | struct boardobj *board_obj_ptr, |
454 | struct nv_pmu_boardobj *ppmudata) | 454 | struct nv_pmu_boardobj *ppmudata) |
455 | { | 455 | { |
456 | u32 status = 0; | 456 | int status = 0; |
457 | struct fll_device *pfll_dev; | 457 | struct fll_device *pfll_dev; |
458 | struct nv_pmu_clk_clk_fll_device_boardobj_set *perf_pmu_data; | 458 | struct nv_pmu_clk_clk_fll_device_boardobj_set *perf_pmu_data; |
459 | 459 | ||
diff --git a/drivers/gpu/nvgpu/clk/clk_fll.h b/drivers/gpu/nvgpu/clk/clk_fll.h index 79ecf5e1..7f7cad97 100644 --- a/drivers/gpu/nvgpu/clk/clk_fll.h +++ b/drivers/gpu/nvgpu/clk/clk_fll.h | |||
@@ -28,8 +28,8 @@ | |||
28 | #include "boardobj/boardobjgrpmask.h" | 28 | #include "boardobj/boardobjgrpmask.h" |
29 | 29 | ||
30 | /*data and function definition to talk to driver*/ | 30 | /*data and function definition to talk to driver*/ |
31 | u32 clk_fll_sw_setup(struct gk20a *g); | 31 | int clk_fll_sw_setup(struct gk20a *g); |
32 | u32 clk_fll_pmu_setup(struct gk20a *g); | 32 | int clk_fll_pmu_setup(struct gk20a *g); |
33 | 33 | ||
34 | struct avfsfllobjs { | 34 | struct avfsfllobjs { |
35 | struct boardobjgrp_e32 super; | 35 | struct boardobjgrp_e32 super; |
@@ -79,4 +79,3 @@ u32 nvgpu_clk_get_vbios_clk_domain_gp10x( u32 vbios_domain); | |||
79 | (pclk->avfs_fllobjs.lut_step_size_uv) | 79 | (pclk->avfs_fllobjs.lut_step_size_uv) |
80 | 80 | ||
81 | #endif | 81 | #endif |
82 | |||
diff --git a/drivers/gpu/nvgpu/clk/clk_freq_controller.c b/drivers/gpu/nvgpu/clk/clk_freq_controller.c index aa2a3a54..f114f5d5 100644 --- a/drivers/gpu/nvgpu/clk/clk_freq_controller.c +++ b/drivers/gpu/nvgpu/clk/clk_freq_controller.c | |||
@@ -32,13 +32,13 @@ | |||
32 | #include "ctrl/ctrlclk.h" | 32 | #include "ctrl/ctrlclk.h" |
33 | #include "ctrl/ctrlvolt.h" | 33 | #include "ctrl/ctrlvolt.h" |
34 | 34 | ||
35 | static u32 clk_freq_controller_pmudatainit_super(struct gk20a *g, | 35 | static int clk_freq_controller_pmudatainit_super(struct gk20a *g, |
36 | struct boardobj *board_obj_ptr, | 36 | struct boardobj *board_obj_ptr, |
37 | struct nv_pmu_boardobj *ppmudata) | 37 | struct nv_pmu_boardobj *ppmudata) |
38 | { | 38 | { |
39 | struct nv_pmu_clk_clk_freq_controller_boardobj_set *pfreq_cntlr_set; | 39 | struct nv_pmu_clk_clk_freq_controller_boardobj_set *pfreq_cntlr_set; |
40 | struct clk_freq_controller *pfreq_cntlr; | 40 | struct clk_freq_controller *pfreq_cntlr; |
41 | u32 status = 0; | 41 | int status = 0; |
42 | 42 | ||
43 | status = boardobj_pmudatainit_super(g, board_obj_ptr, ppmudata); | 43 | status = boardobj_pmudatainit_super(g, board_obj_ptr, ppmudata); |
44 | if (status) { | 44 | if (status) { |
@@ -63,14 +63,14 @@ static u32 clk_freq_controller_pmudatainit_super(struct gk20a *g, | |||
63 | return status; | 63 | return status; |
64 | } | 64 | } |
65 | 65 | ||
66 | static u32 clk_freq_controller_pmudatainit_pi(struct gk20a *g, | 66 | static int clk_freq_controller_pmudatainit_pi(struct gk20a *g, |
67 | struct boardobj *board_obj_ptr, | 67 | struct boardobj *board_obj_ptr, |
68 | struct nv_pmu_boardobj *ppmudata) | 68 | struct nv_pmu_boardobj *ppmudata) |
69 | { | 69 | { |
70 | struct nv_pmu_clk_clk_freq_controller_pi_boardobj_set | 70 | struct nv_pmu_clk_clk_freq_controller_pi_boardobj_set |
71 | *pfreq_cntlr_pi_set; | 71 | *pfreq_cntlr_pi_set; |
72 | struct clk_freq_controller_pi *pfreq_cntlr_pi; | 72 | struct clk_freq_controller_pi *pfreq_cntlr_pi; |
73 | u32 status = 0; | 73 | int status = 0; |
74 | 74 | ||
75 | status = clk_freq_controller_pmudatainit_super(g, | 75 | status = clk_freq_controller_pmudatainit_super(g, |
76 | board_obj_ptr, ppmudata); | 76 | board_obj_ptr, ppmudata); |
@@ -94,13 +94,13 @@ static u32 clk_freq_controller_pmudatainit_pi(struct gk20a *g, | |||
94 | return status; | 94 | return status; |
95 | } | 95 | } |
96 | 96 | ||
97 | static u32 clk_freq_controller_construct_super(struct gk20a *g, | 97 | static int clk_freq_controller_construct_super(struct gk20a *g, |
98 | struct boardobj **ppboardobj, | 98 | struct boardobj **ppboardobj, |
99 | u16 size, void *pargs) | 99 | u16 size, void *pargs) |
100 | { | 100 | { |
101 | struct clk_freq_controller *pfreq_cntlr = NULL; | 101 | struct clk_freq_controller *pfreq_cntlr = NULL; |
102 | struct clk_freq_controller *pfreq_cntlr_tmp = NULL; | 102 | struct clk_freq_controller *pfreq_cntlr_tmp = NULL; |
103 | u32 status = 0; | 103 | int status = 0; |
104 | 104 | ||
105 | status = boardobj_construct_super(g, ppboardobj, size, pargs); | 105 | status = boardobj_construct_super(g, ppboardobj, size, pargs); |
106 | if (status) { | 106 | if (status) { |
@@ -125,13 +125,13 @@ static u32 clk_freq_controller_construct_super(struct gk20a *g, | |||
125 | return status; | 125 | return status; |
126 | } | 126 | } |
127 | 127 | ||
128 | static u32 clk_freq_controller_construct_pi(struct gk20a *g, | 128 | static int clk_freq_controller_construct_pi(struct gk20a *g, |
129 | struct boardobj **ppboardobj, | 129 | struct boardobj **ppboardobj, |
130 | u16 size, void *pargs) | 130 | u16 size, void *pargs) |
131 | { | 131 | { |
132 | struct clk_freq_controller_pi *pfreq_cntlr_pi = NULL; | 132 | struct clk_freq_controller_pi *pfreq_cntlr_pi = NULL; |
133 | struct clk_freq_controller_pi *pfreq_cntlr_pi_tmp = NULL; | 133 | struct clk_freq_controller_pi *pfreq_cntlr_pi_tmp = NULL; |
134 | u32 status = 0; | 134 | int status = 0; |
135 | 135 | ||
136 | status = clk_freq_controller_construct_super(g, ppboardobj, | 136 | status = clk_freq_controller_construct_super(g, ppboardobj, |
137 | size, pargs); | 137 | size, pargs); |
@@ -161,7 +161,7 @@ static struct clk_freq_controller *clk_clk_freq_controller_construct( | |||
161 | void *pargs) | 161 | void *pargs) |
162 | { | 162 | { |
163 | struct boardobj *board_obj_ptr = NULL; | 163 | struct boardobj *board_obj_ptr = NULL; |
164 | u32 status = 0; | 164 | int status = 0; |
165 | 165 | ||
166 | if (BOARDOBJ_GET_TYPE(pargs) != CTRL_CLK_CLK_FREQ_CONTROLLER_TYPE_PI) { | 166 | if (BOARDOBJ_GET_TYPE(pargs) != CTRL_CLK_CLK_FREQ_CONTROLLER_TYPE_PI) { |
167 | return NULL; | 167 | return NULL; |
@@ -177,10 +177,10 @@ static struct clk_freq_controller *clk_clk_freq_controller_construct( | |||
177 | } | 177 | } |
178 | 178 | ||
179 | 179 | ||
180 | static u32 clk_get_freq_controller_table(struct gk20a *g, | 180 | static int clk_get_freq_controller_table(struct gk20a *g, |
181 | struct clk_freq_controllers *pclk_freq_controllers) | 181 | struct clk_freq_controllers *pclk_freq_controllers) |
182 | { | 182 | { |
183 | u32 status = 0; | 183 | int status = 0; |
184 | u8 *pfreq_controller_table_ptr = NULL; | 184 | u8 *pfreq_controller_table_ptr = NULL; |
185 | struct vbios_fct_1x_header header = { 0 }; | 185 | struct vbios_fct_1x_header header = { 0 }; |
186 | struct vbios_fct_1x_entry entry = { 0 }; | 186 | struct vbios_fct_1x_entry entry = { 0 }; |
@@ -324,9 +324,9 @@ done: | |||
324 | return status; | 324 | return status; |
325 | } | 325 | } |
326 | 326 | ||
327 | u32 clk_freq_controller_pmu_setup(struct gk20a *g) | 327 | int clk_freq_controller_pmu_setup(struct gk20a *g) |
328 | { | 328 | { |
329 | u32 status; | 329 | int status; |
330 | struct boardobjgrp *pboardobjgrp = NULL; | 330 | struct boardobjgrp *pboardobjgrp = NULL; |
331 | 331 | ||
332 | nvgpu_log_info(g, " "); | 332 | nvgpu_log_info(g, " "); |
@@ -343,7 +343,7 @@ u32 clk_freq_controller_pmu_setup(struct gk20a *g) | |||
343 | return status; | 343 | return status; |
344 | } | 344 | } |
345 | 345 | ||
346 | static u32 _clk_freq_controller_devgrp_pmudata_instget(struct gk20a *g, | 346 | static int _clk_freq_controller_devgrp_pmudata_instget(struct gk20a *g, |
347 | struct nv_pmu_boardobjgrp *pmuboardobjgrp, | 347 | struct nv_pmu_boardobjgrp *pmuboardobjgrp, |
348 | struct nv_pmu_boardobj **ppboardobjpmudata, | 348 | struct nv_pmu_boardobj **ppboardobjpmudata, |
349 | u8 idx) | 349 | u8 idx) |
@@ -366,7 +366,7 @@ static u32 _clk_freq_controller_devgrp_pmudata_instget(struct gk20a *g, | |||
366 | return 0; | 366 | return 0; |
367 | } | 367 | } |
368 | 368 | ||
369 | static u32 _clk_freq_controllers_pmudatainit(struct gk20a *g, | 369 | static int _clk_freq_controllers_pmudatainit(struct gk20a *g, |
370 | struct boardobjgrp *pboardobjgrp, | 370 | struct boardobjgrp *pboardobjgrp, |
371 | struct nv_pmu_boardobjgrp_super *pboardobjgrppmu) | 371 | struct nv_pmu_boardobjgrp_super *pboardobjgrppmu) |
372 | { | 372 | { |
@@ -375,7 +375,7 @@ static u32 _clk_freq_controllers_pmudatainit(struct gk20a *g, | |||
375 | pboardobjgrppmu; | 375 | pboardobjgrppmu; |
376 | struct clk_freq_controllers *pcntrs = | 376 | struct clk_freq_controllers *pcntrs = |
377 | (struct clk_freq_controllers *)pboardobjgrp; | 377 | (struct clk_freq_controllers *)pboardobjgrp; |
378 | u32 status = 0; | 378 | int status = 0; |
379 | 379 | ||
380 | status = boardobjgrp_pmudatainit_e32(g, pboardobjgrp, pboardobjgrppmu); | 380 | status = boardobjgrp_pmudatainit_e32(g, pboardobjgrp, pboardobjgrppmu); |
381 | if (status) { | 381 | if (status) { |
@@ -391,9 +391,9 @@ done: | |||
391 | return status; | 391 | return status; |
392 | } | 392 | } |
393 | 393 | ||
394 | u32 clk_freq_controller_sw_setup(struct gk20a *g) | 394 | int clk_freq_controller_sw_setup(struct gk20a *g) |
395 | { | 395 | { |
396 | u32 status = 0; | 396 | int status = 0; |
397 | struct boardobjgrp *pboardobjgrp = NULL; | 397 | struct boardobjgrp *pboardobjgrp = NULL; |
398 | struct clk_freq_controllers *pclk_freq_controllers; | 398 | struct clk_freq_controllers *pclk_freq_controllers; |
399 | struct avfsfllobjs *pfllobjs = &(g->clk_pmu.avfs_fllobjs); | 399 | struct avfsfllobjs *pfllobjs = &(g->clk_pmu.avfs_fllobjs); |
diff --git a/drivers/gpu/nvgpu/clk/clk_freq_controller.h b/drivers/gpu/nvgpu/clk/clk_freq_controller.h index 1b8a24c9..659b75d5 100644 --- a/drivers/gpu/nvgpu/clk/clk_freq_controller.h +++ b/drivers/gpu/nvgpu/clk/clk_freq_controller.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) 2016-2017, NVIDIA CORPORATION. All rights reserved. | 2 | * Copyright (c) 2016-2018, NVIDIA CORPORATION. All rights reserved. |
3 | * | 3 | * |
4 | * Permission is hereby granted, free of charge, to any person obtaining a | 4 | * Permission is hereby granted, free of charge, to any person obtaining a |
5 | * copy of this software and associated documentation files (the "Software"), | 5 | * copy of this software and associated documentation files (the "Software"), |
@@ -78,7 +78,7 @@ struct clk_freq_controllers { | |||
78 | void *pprereq_load; | 78 | void *pprereq_load; |
79 | }; | 79 | }; |
80 | 80 | ||
81 | u32 clk_freq_controller_sw_setup(struct gk20a *g); | 81 | int clk_freq_controller_sw_setup(struct gk20a *g); |
82 | u32 clk_freq_controller_pmu_setup(struct gk20a *g); | 82 | int clk_freq_controller_pmu_setup(struct gk20a *g); |
83 | 83 | ||
84 | #endif | 84 | #endif |
diff --git a/drivers/gpu/nvgpu/clk/clk_prog.c b/drivers/gpu/nvgpu/clk/clk_prog.c index 5966d64a..ae8f8e01 100644 --- a/drivers/gpu/nvgpu/clk/clk_prog.c +++ b/drivers/gpu/nvgpu/clk/clk_prog.c | |||
@@ -34,14 +34,14 @@ | |||
34 | #include "ctrl/ctrlvolt.h" | 34 | #include "ctrl/ctrlvolt.h" |
35 | 35 | ||
36 | static struct clk_prog *construct_clk_prog(struct gk20a *g, void *pargs); | 36 | static struct clk_prog *construct_clk_prog(struct gk20a *g, void *pargs); |
37 | static u32 devinit_get_clk_prog_table(struct gk20a *g, | 37 | static int devinit_get_clk_prog_table(struct gk20a *g, |
38 | struct clk_progs *pprogobjs); | 38 | struct clk_progs *pprogobjs); |
39 | static vf_flatten vfflatten_prog_1x_master; | 39 | static vf_flatten vfflatten_prog_1x_master; |
40 | static vf_lookup vflookup_prog_1x_master; | 40 | static vf_lookup vflookup_prog_1x_master; |
41 | static get_fpoints getfpoints_prog_1x_master; | 41 | static get_fpoints getfpoints_prog_1x_master; |
42 | static get_slaveclk getslaveclk_prog_1x_master; | 42 | static get_slaveclk getslaveclk_prog_1x_master; |
43 | 43 | ||
44 | static u32 _clk_progs_pmudatainit(struct gk20a *g, | 44 | static int _clk_progs_pmudatainit(struct gk20a *g, |
45 | struct boardobjgrp *pboardobjgrp, | 45 | struct boardobjgrp *pboardobjgrp, |
46 | struct nv_pmu_boardobjgrp_super *pboardobjgrppmu) | 46 | struct nv_pmu_boardobjgrp_super *pboardobjgrppmu) |
47 | { | 47 | { |
@@ -64,7 +64,7 @@ done: | |||
64 | return status; | 64 | return status; |
65 | } | 65 | } |
66 | 66 | ||
67 | static u32 _clk_progs_pmudata_instget(struct gk20a *g, | 67 | static int _clk_progs_pmudata_instget(struct gk20a *g, |
68 | struct nv_pmu_boardobjgrp *pmuboardobjgrp, | 68 | struct nv_pmu_boardobjgrp *pmuboardobjgrp, |
69 | struct nv_pmu_boardobj **ppboardobjpmudata, | 69 | struct nv_pmu_boardobj **ppboardobjpmudata, |
70 | u8 idx) | 70 | u8 idx) |
@@ -86,9 +86,9 @@ static u32 _clk_progs_pmudata_instget(struct gk20a *g, | |||
86 | return 0; | 86 | return 0; |
87 | } | 87 | } |
88 | 88 | ||
89 | u32 clk_prog_sw_setup(struct gk20a *g) | 89 | int clk_prog_sw_setup(struct gk20a *g) |
90 | { | 90 | { |
91 | u32 status; | 91 | int status; |
92 | struct boardobjgrp *pboardobjgrp = NULL; | 92 | struct boardobjgrp *pboardobjgrp = NULL; |
93 | struct clk_progs *pclkprogobjs; | 93 | struct clk_progs *pclkprogobjs; |
94 | 94 | ||
@@ -136,9 +136,9 @@ done: | |||
136 | return status; | 136 | return status; |
137 | } | 137 | } |
138 | 138 | ||
139 | u32 clk_prog_pmu_setup(struct gk20a *g) | 139 | int clk_prog_pmu_setup(struct gk20a *g) |
140 | { | 140 | { |
141 | u32 status; | 141 | int status; |
142 | struct boardobjgrp *pboardobjgrp = NULL; | 142 | struct boardobjgrp *pboardobjgrp = NULL; |
143 | 143 | ||
144 | nvgpu_log_info(g, " "); | 144 | nvgpu_log_info(g, " "); |
@@ -155,10 +155,10 @@ u32 clk_prog_pmu_setup(struct gk20a *g) | |||
155 | return status; | 155 | return status; |
156 | } | 156 | } |
157 | 157 | ||
158 | static u32 devinit_get_clk_prog_table(struct gk20a *g, | 158 | static int devinit_get_clk_prog_table(struct gk20a *g, |
159 | struct clk_progs *pclkprogobjs) | 159 | struct clk_progs *pclkprogobjs) |
160 | { | 160 | { |
161 | u32 status = 0; | 161 | int status = 0; |
162 | u8 *clkprogs_tbl_ptr = NULL; | 162 | u8 *clkprogs_tbl_ptr = NULL; |
163 | struct vbios_clock_programming_table_1x_header header = { 0 }; | 163 | struct vbios_clock_programming_table_1x_header header = { 0 }; |
164 | struct vbios_clock_programming_table_1x_entry prog = { 0 }; | 164 | struct vbios_clock_programming_table_1x_entry prog = { 0 }; |
@@ -379,11 +379,11 @@ done: | |||
379 | return status; | 379 | return status; |
380 | } | 380 | } |
381 | 381 | ||
382 | static u32 _clk_prog_pmudatainit_super(struct gk20a *g, | 382 | static int _clk_prog_pmudatainit_super(struct gk20a *g, |
383 | struct boardobj *board_obj_ptr, | 383 | struct boardobj *board_obj_ptr, |
384 | struct nv_pmu_boardobj *ppmudata) | 384 | struct nv_pmu_boardobj *ppmudata) |
385 | { | 385 | { |
386 | u32 status = 0; | 386 | int status = 0; |
387 | 387 | ||
388 | nvgpu_log_info(g, " "); | 388 | nvgpu_log_info(g, " "); |
389 | 389 | ||
@@ -391,11 +391,11 @@ static u32 _clk_prog_pmudatainit_super(struct gk20a *g, | |||
391 | return status; | 391 | return status; |
392 | } | 392 | } |
393 | 393 | ||
394 | static u32 _clk_prog_pmudatainit_1x(struct gk20a *g, | 394 | static int _clk_prog_pmudatainit_1x(struct gk20a *g, |
395 | struct boardobj *board_obj_ptr, | 395 | struct boardobj *board_obj_ptr, |
396 | struct nv_pmu_boardobj *ppmudata) | 396 | struct nv_pmu_boardobj *ppmudata) |
397 | { | 397 | { |
398 | u32 status = 0; | 398 | int status = 0; |
399 | struct clk_prog_1x *pclk_prog_1x; | 399 | struct clk_prog_1x *pclk_prog_1x; |
400 | struct nv_pmu_clk_clk_prog_1x_boardobj_set *pset; | 400 | struct nv_pmu_clk_clk_prog_1x_boardobj_set *pset; |
401 | 401 | ||
@@ -418,11 +418,11 @@ static u32 _clk_prog_pmudatainit_1x(struct gk20a *g, | |||
418 | return status; | 418 | return status; |
419 | } | 419 | } |
420 | 420 | ||
421 | static u32 _clk_prog_pmudatainit_1x_master(struct gk20a *g, | 421 | static int _clk_prog_pmudatainit_1x_master(struct gk20a *g, |
422 | struct boardobj *board_obj_ptr, | 422 | struct boardobj *board_obj_ptr, |
423 | struct nv_pmu_boardobj *ppmudata) | 423 | struct nv_pmu_boardobj *ppmudata) |
424 | { | 424 | { |
425 | u32 status = 0; | 425 | int status = 0; |
426 | struct clk_prog_1x_master *pclk_prog_1x_master; | 426 | struct clk_prog_1x_master *pclk_prog_1x_master; |
427 | struct nv_pmu_clk_clk_prog_1x_master_boardobj_set *pset; | 427 | struct nv_pmu_clk_clk_prog_1x_master_boardobj_set *pset; |
428 | u32 vfsize = sizeof(struct ctrl_clk_clk_prog_1x_master_vf_entry) * | 428 | u32 vfsize = sizeof(struct ctrl_clk_clk_prog_1x_master_vf_entry) * |
@@ -449,11 +449,11 @@ static u32 _clk_prog_pmudatainit_1x_master(struct gk20a *g, | |||
449 | return status; | 449 | return status; |
450 | } | 450 | } |
451 | 451 | ||
452 | static u32 _clk_prog_pmudatainit_1x_master_ratio(struct gk20a *g, | 452 | static int _clk_prog_pmudatainit_1x_master_ratio(struct gk20a *g, |
453 | struct boardobj *board_obj_ptr, | 453 | struct boardobj *board_obj_ptr, |
454 | struct nv_pmu_boardobj *ppmudata) | 454 | struct nv_pmu_boardobj *ppmudata) |
455 | { | 455 | { |
456 | u32 status = 0; | 456 | int status = 0; |
457 | struct clk_prog_1x_master_ratio *pclk_prog_1x_master_ratio; | 457 | struct clk_prog_1x_master_ratio *pclk_prog_1x_master_ratio; |
458 | struct nv_pmu_clk_clk_prog_1x_master_ratio_boardobj_set *pset; | 458 | struct nv_pmu_clk_clk_prog_1x_master_ratio_boardobj_set *pset; |
459 | u32 slavesize = sizeof(struct ctrl_clk_clk_prog_1x_master_ratio_slave_entry) * | 459 | u32 slavesize = sizeof(struct ctrl_clk_clk_prog_1x_master_ratio_slave_entry) * |
@@ -478,11 +478,11 @@ static u32 _clk_prog_pmudatainit_1x_master_ratio(struct gk20a *g, | |||
478 | return status; | 478 | return status; |
479 | } | 479 | } |
480 | 480 | ||
481 | static u32 _clk_prog_pmudatainit_1x_master_table(struct gk20a *g, | 481 | static int _clk_prog_pmudatainit_1x_master_table(struct gk20a *g, |
482 | struct boardobj *board_obj_ptr, | 482 | struct boardobj *board_obj_ptr, |
483 | struct nv_pmu_boardobj *ppmudata) | 483 | struct nv_pmu_boardobj *ppmudata) |
484 | { | 484 | { |
485 | u32 status = 0; | 485 | int status = 0; |
486 | struct clk_prog_1x_master_table *pclk_prog_1x_master_table; | 486 | struct clk_prog_1x_master_table *pclk_prog_1x_master_table; |
487 | struct nv_pmu_clk_clk_prog_1x_master_table_boardobj_set *pset; | 487 | struct nv_pmu_clk_clk_prog_1x_master_table_boardobj_set *pset; |
488 | u32 slavesize = sizeof(struct ctrl_clk_clk_prog_1x_master_ratio_slave_entry) * | 488 | u32 slavesize = sizeof(struct ctrl_clk_clk_prog_1x_master_ratio_slave_entry) * |
@@ -538,12 +538,12 @@ done: | |||
538 | return status; | 538 | return status; |
539 | } | 539 | } |
540 | 540 | ||
541 | static u32 clk_prog_construct_super(struct gk20a *g, | 541 | static int clk_prog_construct_super(struct gk20a *g, |
542 | struct boardobj **ppboardobj, | 542 | struct boardobj **ppboardobj, |
543 | u16 size, void *pargs) | 543 | u16 size, void *pargs) |
544 | { | 544 | { |
545 | struct clk_prog *pclkprog; | 545 | struct clk_prog *pclkprog; |
546 | u32 status = 0; | 546 | int status = 0; |
547 | 547 | ||
548 | status = boardobj_construct_super(g, ppboardobj, | 548 | status = boardobj_construct_super(g, ppboardobj, |
549 | size, pargs); | 549 | size, pargs); |
@@ -559,7 +559,7 @@ static u32 clk_prog_construct_super(struct gk20a *g, | |||
559 | } | 559 | } |
560 | 560 | ||
561 | 561 | ||
562 | static u32 clk_prog_construct_1x(struct gk20a *g, | 562 | static int clk_prog_construct_1x(struct gk20a *g, |
563 | struct boardobj **ppboardobj, | 563 | struct boardobj **ppboardobj, |
564 | u16 size, void *pargs) | 564 | u16 size, void *pargs) |
565 | { | 565 | { |
@@ -567,7 +567,7 @@ static u32 clk_prog_construct_1x(struct gk20a *g, | |||
567 | struct clk_prog_1x *pclkprog; | 567 | struct clk_prog_1x *pclkprog; |
568 | struct clk_prog_1x *ptmpprog = | 568 | struct clk_prog_1x *ptmpprog = |
569 | (struct clk_prog_1x *)pargs; | 569 | (struct clk_prog_1x *)pargs; |
570 | u32 status = 0; | 570 | int status = 0; |
571 | 571 | ||
572 | nvgpu_log_info(g, " "); | 572 | nvgpu_log_info(g, " "); |
573 | ptmpobj->type_mask |= BIT(CTRL_CLK_CLK_PROG_TYPE_1X); | 573 | ptmpobj->type_mask |= BIT(CTRL_CLK_CLK_PROG_TYPE_1X); |
@@ -588,7 +588,7 @@ static u32 clk_prog_construct_1x(struct gk20a *g, | |||
588 | return status; | 588 | return status; |
589 | } | 589 | } |
590 | 590 | ||
591 | static u32 clk_prog_construct_1x_master(struct gk20a *g, | 591 | static int clk_prog_construct_1x_master(struct gk20a *g, |
592 | struct boardobj **ppboardobj, | 592 | struct boardobj **ppboardobj, |
593 | u16 size, void *pargs) | 593 | u16 size, void *pargs) |
594 | { | 594 | { |
@@ -596,7 +596,7 @@ static u32 clk_prog_construct_1x_master(struct gk20a *g, | |||
596 | struct clk_prog_1x_master *pclkprog; | 596 | struct clk_prog_1x_master *pclkprog; |
597 | struct clk_prog_1x_master *ptmpprog = | 597 | struct clk_prog_1x_master *ptmpprog = |
598 | (struct clk_prog_1x_master *)pargs; | 598 | (struct clk_prog_1x_master *)pargs; |
599 | u32 status = 0; | 599 | int status = 0; |
600 | u32 vfsize = sizeof(struct ctrl_clk_clk_prog_1x_master_vf_entry) * | 600 | u32 vfsize = sizeof(struct ctrl_clk_clk_prog_1x_master_vf_entry) * |
601 | g->clk_pmu.clk_progobjs.vf_entry_count; | 601 | g->clk_pmu.clk_progobjs.vf_entry_count; |
602 | u8 railidx; | 602 | u8 railidx; |
@@ -645,7 +645,7 @@ static u32 clk_prog_construct_1x_master(struct gk20a *g, | |||
645 | return status; | 645 | return status; |
646 | } | 646 | } |
647 | 647 | ||
648 | static u32 clk_prog_construct_1x_master_ratio(struct gk20a *g, | 648 | static int clk_prog_construct_1x_master_ratio(struct gk20a *g, |
649 | struct boardobj **ppboardobj, | 649 | struct boardobj **ppboardobj, |
650 | u16 size, void *pargs) | 650 | u16 size, void *pargs) |
651 | { | 651 | { |
@@ -653,7 +653,7 @@ static u32 clk_prog_construct_1x_master_ratio(struct gk20a *g, | |||
653 | struct clk_prog_1x_master_ratio *pclkprog; | 653 | struct clk_prog_1x_master_ratio *pclkprog; |
654 | struct clk_prog_1x_master_ratio *ptmpprog = | 654 | struct clk_prog_1x_master_ratio *ptmpprog = |
655 | (struct clk_prog_1x_master_ratio *)pargs; | 655 | (struct clk_prog_1x_master_ratio *)pargs; |
656 | u32 status = 0; | 656 | int status = 0; |
657 | u32 slavesize = sizeof(struct ctrl_clk_clk_prog_1x_master_ratio_slave_entry) * | 657 | u32 slavesize = sizeof(struct ctrl_clk_clk_prog_1x_master_ratio_slave_entry) * |
658 | g->clk_pmu.clk_progobjs.slave_entry_count; | 658 | g->clk_pmu.clk_progobjs.slave_entry_count; |
659 | 659 | ||
@@ -687,7 +687,7 @@ static u32 clk_prog_construct_1x_master_ratio(struct gk20a *g, | |||
687 | return status; | 687 | return status; |
688 | } | 688 | } |
689 | 689 | ||
690 | static u32 clk_prog_construct_1x_master_table(struct gk20a *g, | 690 | static int clk_prog_construct_1x_master_table(struct gk20a *g, |
691 | struct boardobj **ppboardobj, | 691 | struct boardobj **ppboardobj, |
692 | u16 size, void *pargs) | 692 | u16 size, void *pargs) |
693 | { | 693 | { |
@@ -695,7 +695,7 @@ static u32 clk_prog_construct_1x_master_table(struct gk20a *g, | |||
695 | struct clk_prog_1x_master_table *pclkprog; | 695 | struct clk_prog_1x_master_table *pclkprog; |
696 | struct clk_prog_1x_master_table *ptmpprog = | 696 | struct clk_prog_1x_master_table *ptmpprog = |
697 | (struct clk_prog_1x_master_table *)pargs; | 697 | (struct clk_prog_1x_master_table *)pargs; |
698 | u32 status = 0; | 698 | int status = 0; |
699 | u32 slavesize = sizeof(struct ctrl_clk_clk_prog_1x_master_ratio_slave_entry) * | 699 | u32 slavesize = sizeof(struct ctrl_clk_clk_prog_1x_master_ratio_slave_entry) * |
700 | g->clk_pmu.clk_progobjs.slave_entry_count; | 700 | g->clk_pmu.clk_progobjs.slave_entry_count; |
701 | 701 | ||
@@ -741,7 +741,7 @@ exit: | |||
741 | static struct clk_prog *construct_clk_prog(struct gk20a *g, void *pargs) | 741 | static struct clk_prog *construct_clk_prog(struct gk20a *g, void *pargs) |
742 | { | 742 | { |
743 | struct boardobj *board_obj_ptr = NULL; | 743 | struct boardobj *board_obj_ptr = NULL; |
744 | u32 status; | 744 | int status; |
745 | 745 | ||
746 | nvgpu_log_info(g, " type - %x", BOARDOBJ_GET_TYPE(pargs)); | 746 | nvgpu_log_info(g, " type - %x", BOARDOBJ_GET_TYPE(pargs)); |
747 | switch (BOARDOBJ_GET_TYPE(pargs)) { | 747 | switch (BOARDOBJ_GET_TYPE(pargs)) { |
diff --git a/drivers/gpu/nvgpu/clk/clk_prog.h b/drivers/gpu/nvgpu/clk/clk_prog.h index 64cb1b51..cabe0bf0 100644 --- a/drivers/gpu/nvgpu/clk/clk_prog.h +++ b/drivers/gpu/nvgpu/clk/clk_prog.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) 2016-2017, NVIDIA CORPORATION. All rights reserved. | 2 | * Copyright (c) 2016-2018, NVIDIA CORPORATION. All rights reserved. |
3 | * | 3 | * |
4 | * Permission is hereby granted, free of charge, to any person obtaining a | 4 | * Permission is hereby granted, free of charge, to any person obtaining a |
5 | * copy of this software and associated documentation files (the "Software"), | 5 | * copy of this software and associated documentation files (the "Software"), |
@@ -29,8 +29,8 @@ | |||
29 | #include "boardobj/boardobjgrp_e255.h" | 29 | #include "boardobj/boardobjgrp_e255.h" |
30 | #include "boardobj/boardobjgrpmask.h" | 30 | #include "boardobj/boardobjgrpmask.h" |
31 | 31 | ||
32 | u32 clk_prog_sw_setup(struct gk20a *g); | 32 | int clk_prog_sw_setup(struct gk20a *g); |
33 | u32 clk_prog_pmu_setup(struct gk20a *g); | 33 | int clk_prog_pmu_setup(struct gk20a *g); |
34 | struct clk_prog_1x_master; | 34 | struct clk_prog_1x_master; |
35 | 35 | ||
36 | typedef u32 vf_flatten(struct gk20a *g, struct clk_pmupstate *pclk, | 36 | typedef u32 vf_flatten(struct gk20a *g, struct clk_pmupstate *pclk, |
diff --git a/drivers/gpu/nvgpu/clk/clk_vf_point.c b/drivers/gpu/nvgpu/clk/clk_vf_point.c index 5fc1d8e5..80eefe96 100644 --- a/drivers/gpu/nvgpu/clk/clk_vf_point.c +++ b/drivers/gpu/nvgpu/clk/clk_vf_point.c | |||
@@ -29,10 +29,10 @@ | |||
29 | #include "ctrl/ctrlclk.h" | 29 | #include "ctrl/ctrlclk.h" |
30 | #include "ctrl/ctrlvolt.h" | 30 | #include "ctrl/ctrlvolt.h" |
31 | 31 | ||
32 | static u32 _clk_vf_point_pmudatainit_super(struct gk20a *g, struct boardobj | 32 | static int _clk_vf_point_pmudatainit_super(struct gk20a *g, struct boardobj |
33 | *board_obj_ptr, struct nv_pmu_boardobj *ppmudata); | 33 | *board_obj_ptr, struct nv_pmu_boardobj *ppmudata); |
34 | 34 | ||
35 | static u32 _clk_vf_points_pmudatainit(struct gk20a *g, | 35 | static int _clk_vf_points_pmudatainit(struct gk20a *g, |
36 | struct boardobjgrp *pboardobjgrp, | 36 | struct boardobjgrp *pboardobjgrp, |
37 | struct nv_pmu_boardobjgrp_super *pboardobjgrppmu) | 37 | struct nv_pmu_boardobjgrp_super *pboardobjgrppmu) |
38 | { | 38 | { |
@@ -50,7 +50,7 @@ done: | |||
50 | return status; | 50 | return status; |
51 | } | 51 | } |
52 | 52 | ||
53 | static u32 _clk_vf_points_pmudata_instget(struct gk20a *g, | 53 | static int _clk_vf_points_pmudata_instget(struct gk20a *g, |
54 | struct nv_pmu_boardobjgrp *pmuboardobjgrp, | 54 | struct nv_pmu_boardobjgrp *pmuboardobjgrp, |
55 | struct nv_pmu_boardobj **ppboardobjpmudata, | 55 | struct nv_pmu_boardobj **ppboardobjpmudata, |
56 | u8 idx) | 56 | u8 idx) |
@@ -72,7 +72,7 @@ static u32 _clk_vf_points_pmudata_instget(struct gk20a *g, | |||
72 | return 0; | 72 | return 0; |
73 | } | 73 | } |
74 | 74 | ||
75 | static u32 _clk_vf_points_pmustatus_instget(struct gk20a *g, | 75 | static int _clk_vf_points_pmustatus_instget(struct gk20a *g, |
76 | void *pboardobjgrppmu, | 76 | void *pboardobjgrppmu, |
77 | struct nv_pmu_boardobj_query **ppboardobjpmustatus, | 77 | struct nv_pmu_boardobj_query **ppboardobjpmustatus, |
78 | u8 idx) | 78 | u8 idx) |
@@ -91,9 +91,9 @@ static u32 _clk_vf_points_pmustatus_instget(struct gk20a *g, | |||
91 | return 0; | 91 | return 0; |
92 | } | 92 | } |
93 | 93 | ||
94 | u32 clk_vf_point_sw_setup(struct gk20a *g) | 94 | int clk_vf_point_sw_setup(struct gk20a *g) |
95 | { | 95 | { |
96 | u32 status; | 96 | int status; |
97 | struct boardobjgrp *pboardobjgrp = NULL; | 97 | struct boardobjgrp *pboardobjgrp = NULL; |
98 | 98 | ||
99 | nvgpu_log_info(g, " "); | 99 | nvgpu_log_info(g, " "); |
@@ -138,9 +138,9 @@ done: | |||
138 | return status; | 138 | return status; |
139 | } | 139 | } |
140 | 140 | ||
141 | u32 clk_vf_point_pmu_setup(struct gk20a *g) | 141 | int clk_vf_point_pmu_setup(struct gk20a *g) |
142 | { | 142 | { |
143 | u32 status; | 143 | int status; |
144 | struct boardobjgrp *pboardobjgrp = NULL; | 144 | struct boardobjgrp *pboardobjgrp = NULL; |
145 | 145 | ||
146 | nvgpu_log_info(g, " "); | 146 | nvgpu_log_info(g, " "); |
@@ -157,14 +157,14 @@ u32 clk_vf_point_pmu_setup(struct gk20a *g) | |||
157 | return status; | 157 | return status; |
158 | } | 158 | } |
159 | 159 | ||
160 | static u32 clk_vf_point_construct_super(struct gk20a *g, | 160 | static int clk_vf_point_construct_super(struct gk20a *g, |
161 | struct boardobj **ppboardobj, | 161 | struct boardobj **ppboardobj, |
162 | u16 size, void *pargs) | 162 | u16 size, void *pargs) |
163 | { | 163 | { |
164 | struct clk_vf_point *pclkvfpoint; | 164 | struct clk_vf_point *pclkvfpoint; |
165 | struct clk_vf_point *ptmpvfpoint = | 165 | struct clk_vf_point *ptmpvfpoint = |
166 | (struct clk_vf_point *)pargs; | 166 | (struct clk_vf_point *)pargs; |
167 | u32 status = 0; | 167 | int status = 0; |
168 | 168 | ||
169 | status = boardobj_construct_super(g, ppboardobj, | 169 | status = boardobj_construct_super(g, ppboardobj, |
170 | size, pargs); | 170 | size, pargs); |
@@ -183,11 +183,11 @@ static u32 clk_vf_point_construct_super(struct gk20a *g, | |||
183 | return status; | 183 | return status; |
184 | } | 184 | } |
185 | 185 | ||
186 | static u32 _clk_vf_point_pmudatainit_volt(struct gk20a *g, | 186 | static int _clk_vf_point_pmudatainit_volt(struct gk20a *g, |
187 | struct boardobj *board_obj_ptr, | 187 | struct boardobj *board_obj_ptr, |
188 | struct nv_pmu_boardobj *ppmudata) | 188 | struct nv_pmu_boardobj *ppmudata) |
189 | { | 189 | { |
190 | u32 status = 0; | 190 | int status = 0; |
191 | struct clk_vf_point_volt *pclk_vf_point_volt; | 191 | struct clk_vf_point_volt *pclk_vf_point_volt; |
192 | struct nv_pmu_clk_clk_vf_point_volt_boardobj_set *pset; | 192 | struct nv_pmu_clk_clk_vf_point_volt_boardobj_set *pset; |
193 | 193 | ||
@@ -211,11 +211,11 @@ static u32 _clk_vf_point_pmudatainit_volt(struct gk20a *g, | |||
211 | return status; | 211 | return status; |
212 | } | 212 | } |
213 | 213 | ||
214 | static u32 _clk_vf_point_pmudatainit_freq(struct gk20a *g, | 214 | static int _clk_vf_point_pmudatainit_freq(struct gk20a *g, |
215 | struct boardobj *board_obj_ptr, | 215 | struct boardobj *board_obj_ptr, |
216 | struct nv_pmu_boardobj *ppmudata) | 216 | struct nv_pmu_boardobj *ppmudata) |
217 | { | 217 | { |
218 | u32 status = 0; | 218 | int status = 0; |
219 | struct clk_vf_point_freq *pclk_vf_point_freq; | 219 | struct clk_vf_point_freq *pclk_vf_point_freq; |
220 | struct nv_pmu_clk_clk_vf_point_freq_boardobj_set *pset; | 220 | struct nv_pmu_clk_clk_vf_point_freq_boardobj_set *pset; |
221 | 221 | ||
@@ -240,7 +240,7 @@ static u32 _clk_vf_point_pmudatainit_freq(struct gk20a *g, | |||
240 | return status; | 240 | return status; |
241 | } | 241 | } |
242 | 242 | ||
243 | static u32 clk_vf_point_construct_volt(struct gk20a *g, | 243 | static int clk_vf_point_construct_volt(struct gk20a *g, |
244 | struct boardobj **ppboardobj, | 244 | struct boardobj **ppboardobj, |
245 | u16 size, void *pargs) | 245 | u16 size, void *pargs) |
246 | { | 246 | { |
@@ -248,7 +248,7 @@ static u32 clk_vf_point_construct_volt(struct gk20a *g, | |||
248 | struct clk_vf_point_volt *pclkvfpoint; | 248 | struct clk_vf_point_volt *pclkvfpoint; |
249 | struct clk_vf_point_volt *ptmpvfpoint = | 249 | struct clk_vf_point_volt *ptmpvfpoint = |
250 | (struct clk_vf_point_volt *)pargs; | 250 | (struct clk_vf_point_volt *)pargs; |
251 | u32 status = 0; | 251 | int status = 0; |
252 | 252 | ||
253 | if (BOARDOBJ_GET_TYPE(pargs) != CTRL_CLK_CLK_VF_POINT_TYPE_VOLT) { | 253 | if (BOARDOBJ_GET_TYPE(pargs) != CTRL_CLK_CLK_VF_POINT_TYPE_VOLT) { |
254 | return -EINVAL; | 254 | return -EINVAL; |
@@ -271,7 +271,7 @@ static u32 clk_vf_point_construct_volt(struct gk20a *g, | |||
271 | return status; | 271 | return status; |
272 | } | 272 | } |
273 | 273 | ||
274 | static u32 clk_vf_point_construct_freq(struct gk20a *g, | 274 | static int clk_vf_point_construct_freq(struct gk20a *g, |
275 | struct boardobj **ppboardobj, | 275 | struct boardobj **ppboardobj, |
276 | u16 size, void *pargs) | 276 | u16 size, void *pargs) |
277 | { | 277 | { |
@@ -279,7 +279,7 @@ static u32 clk_vf_point_construct_freq(struct gk20a *g, | |||
279 | struct clk_vf_point_freq *pclkvfpoint; | 279 | struct clk_vf_point_freq *pclkvfpoint; |
280 | struct clk_vf_point_freq *ptmpvfpoint = | 280 | struct clk_vf_point_freq *ptmpvfpoint = |
281 | (struct clk_vf_point_freq *)pargs; | 281 | (struct clk_vf_point_freq *)pargs; |
282 | u32 status = 0; | 282 | int status = 0; |
283 | 283 | ||
284 | if (BOARDOBJ_GET_TYPE(pargs) != CTRL_CLK_CLK_VF_POINT_TYPE_FREQ) { | 284 | if (BOARDOBJ_GET_TYPE(pargs) != CTRL_CLK_CLK_VF_POINT_TYPE_FREQ) { |
285 | return -EINVAL; | 285 | return -EINVAL; |
@@ -305,7 +305,7 @@ static u32 clk_vf_point_construct_freq(struct gk20a *g, | |||
305 | struct clk_vf_point *construct_clk_vf_point(struct gk20a *g, void *pargs) | 305 | struct clk_vf_point *construct_clk_vf_point(struct gk20a *g, void *pargs) |
306 | { | 306 | { |
307 | struct boardobj *board_obj_ptr = NULL; | 307 | struct boardobj *board_obj_ptr = NULL; |
308 | u32 status; | 308 | int status; |
309 | 309 | ||
310 | nvgpu_log_info(g, " "); | 310 | nvgpu_log_info(g, " "); |
311 | switch (BOARDOBJ_GET_TYPE(pargs)) { | 311 | switch (BOARDOBJ_GET_TYPE(pargs)) { |
@@ -332,11 +332,11 @@ struct clk_vf_point *construct_clk_vf_point(struct gk20a *g, void *pargs) | |||
332 | return (struct clk_vf_point *)board_obj_ptr; | 332 | return (struct clk_vf_point *)board_obj_ptr; |
333 | } | 333 | } |
334 | 334 | ||
335 | static u32 _clk_vf_point_pmudatainit_super(struct gk20a *g, | 335 | static int _clk_vf_point_pmudatainit_super(struct gk20a *g, |
336 | struct boardobj *board_obj_ptr, | 336 | struct boardobj *board_obj_ptr, |
337 | struct nv_pmu_boardobj *ppmudata) | 337 | struct nv_pmu_boardobj *ppmudata) |
338 | { | 338 | { |
339 | u32 status = 0; | 339 | int status = 0; |
340 | struct clk_vf_point *pclk_vf_point; | 340 | struct clk_vf_point *pclk_vf_point; |
341 | struct nv_pmu_clk_clk_vf_point_boardobj_set *pset; | 341 | struct nv_pmu_clk_clk_vf_point_boardobj_set *pset; |
342 | 342 | ||
@@ -360,7 +360,7 @@ static u32 _clk_vf_point_pmudatainit_super(struct gk20a *g, | |||
360 | } | 360 | } |
361 | 361 | ||
362 | 362 | ||
363 | static u32 clk_vf_point_update(struct gk20a *g, | 363 | static int clk_vf_point_update(struct gk20a *g, |
364 | struct boardobj *board_obj_ptr, | 364 | struct boardobj *board_obj_ptr, |
365 | struct nv_pmu_boardobj *ppmudata) | 365 | struct nv_pmu_boardobj *ppmudata) |
366 | { | 366 | { |
@@ -388,7 +388,7 @@ static u32 clk_vf_point_update(struct gk20a *g, | |||
388 | } | 388 | } |
389 | 389 | ||
390 | /*get latest vf point data from PMU */ | 390 | /*get latest vf point data from PMU */ |
391 | u32 clk_vf_point_cache(struct gk20a *g) | 391 | int clk_vf_point_cache(struct gk20a *g) |
392 | { | 392 | { |
393 | 393 | ||
394 | struct clk_vf_points *pclk_vf_points; | 394 | struct clk_vf_points *pclk_vf_points; |
@@ -397,7 +397,7 @@ u32 clk_vf_point_cache(struct gk20a *g) | |||
397 | struct nv_pmu_boardobjgrp_super *pboardobjgrppmu; | 397 | struct nv_pmu_boardobjgrp_super *pboardobjgrppmu; |
398 | struct boardobj *pboardobj = NULL; | 398 | struct boardobj *pboardobj = NULL; |
399 | struct nv_pmu_boardobj_query *pboardobjpmustatus = NULL; | 399 | struct nv_pmu_boardobj_query *pboardobjpmustatus = NULL; |
400 | u32 status; | 400 | int status; |
401 | u8 index; | 401 | u8 index; |
402 | 402 | ||
403 | nvgpu_log_info(g, " "); | 403 | nvgpu_log_info(g, " "); |
diff --git a/drivers/gpu/nvgpu/clk/clk_vf_point.h b/drivers/gpu/nvgpu/clk/clk_vf_point.h index b67434b7..a4e2f48f 100644 --- a/drivers/gpu/nvgpu/clk/clk_vf_point.h +++ b/drivers/gpu/nvgpu/clk/clk_vf_point.h | |||
@@ -28,9 +28,9 @@ | |||
28 | #include "boardobj/boardobjgrp_e32.h" | 28 | #include "boardobj/boardobjgrp_e32.h" |
29 | #include "boardobj/boardobjgrpmask.h" | 29 | #include "boardobj/boardobjgrpmask.h" |
30 | 30 | ||
31 | u32 clk_vf_point_sw_setup(struct gk20a *g); | 31 | int clk_vf_point_sw_setup(struct gk20a *g); |
32 | u32 clk_vf_point_pmu_setup(struct gk20a *g); | 32 | int clk_vf_point_pmu_setup(struct gk20a *g); |
33 | u32 clk_vf_point_cache(struct gk20a *g); | 33 | int clk_vf_point_cache(struct gk20a *g); |
34 | 34 | ||
35 | struct clk_vf_points { | 35 | struct clk_vf_points { |
36 | struct boardobjgrp_e255 super; | 36 | struct boardobjgrp_e255 super; |
diff --git a/drivers/gpu/nvgpu/clk/clk_vin.c b/drivers/gpu/nvgpu/clk/clk_vin.c index 1c18b662..9a163594 100644 --- a/drivers/gpu/nvgpu/clk/clk_vin.c +++ b/drivers/gpu/nvgpu/clk/clk_vin.c | |||
@@ -36,27 +36,27 @@ | |||
36 | #include "clk.h" | 36 | #include "clk.h" |
37 | #include "clk_vin.h" | 37 | #include "clk_vin.h" |
38 | 38 | ||
39 | static u32 devinit_get_vin_device_table(struct gk20a *g, | 39 | static int devinit_get_vin_device_table(struct gk20a *g, |
40 | struct avfsvinobjs *pvinobjs); | 40 | struct avfsvinobjs *pvinobjs); |
41 | 41 | ||
42 | static u32 vin_device_construct_v10(struct gk20a *g, | 42 | static int vin_device_construct_v10(struct gk20a *g, |
43 | struct boardobj **ppboardobj, | 43 | struct boardobj **ppboardobj, |
44 | u16 size, void *pargs); | 44 | u16 size, void *pargs); |
45 | static u32 vin_device_construct_v20(struct gk20a *g, | 45 | static int vin_device_construct_v20(struct gk20a *g, |
46 | struct boardobj **ppboardobj, | 46 | struct boardobj **ppboardobj, |
47 | u16 size, void *pargs); | 47 | u16 size, void *pargs); |
48 | static u32 vin_device_construct_super(struct gk20a *g, | 48 | static int vin_device_construct_super(struct gk20a *g, |
49 | struct boardobj **ppboardobj, | 49 | struct boardobj **ppboardobj, |
50 | u16 size, void *pargs); | 50 | u16 size, void *pargs); |
51 | static struct vin_device *construct_vin_device(struct gk20a *g, void *pargs); | 51 | static struct vin_device *construct_vin_device(struct gk20a *g, void *pargs); |
52 | 52 | ||
53 | static u32 vin_device_init_pmudata_v10(struct gk20a *g, | 53 | static int vin_device_init_pmudata_v10(struct gk20a *g, |
54 | struct boardobj *board_obj_ptr, | 54 | struct boardobj *board_obj_ptr, |
55 | struct nv_pmu_boardobj *ppmudata); | 55 | struct nv_pmu_boardobj *ppmudata); |
56 | static u32 vin_device_init_pmudata_v20(struct gk20a *g, | 56 | static int vin_device_init_pmudata_v20(struct gk20a *g, |
57 | struct boardobj *board_obj_ptr, | 57 | struct boardobj *board_obj_ptr, |
58 | struct nv_pmu_boardobj *ppmudata); | 58 | struct nv_pmu_boardobj *ppmudata); |
59 | static u32 vin_device_init_pmudata_super(struct gk20a *g, | 59 | static int vin_device_init_pmudata_super(struct gk20a *g, |
60 | struct boardobj *board_obj_ptr, | 60 | struct boardobj *board_obj_ptr, |
61 | struct nv_pmu_boardobj *ppmudata); | 61 | struct nv_pmu_boardobj *ppmudata); |
62 | 62 | ||
@@ -122,7 +122,7 @@ u32 clk_avfs_get_vin_cal_fuse_v20(struct gk20a *g, | |||
122 | 122 | ||
123 | } | 123 | } |
124 | 124 | ||
125 | static u32 _clk_vin_devgrp_pmudatainit_super(struct gk20a *g, | 125 | static int _clk_vin_devgrp_pmudatainit_super(struct gk20a *g, |
126 | struct boardobjgrp *pboardobjgrp, | 126 | struct boardobjgrp *pboardobjgrp, |
127 | struct nv_pmu_boardobjgrp_super *pboardobjgrppmu) | 127 | struct nv_pmu_boardobjgrp_super *pboardobjgrppmu) |
128 | { | 128 | { |
@@ -130,7 +130,7 @@ static u32 _clk_vin_devgrp_pmudatainit_super(struct gk20a *g, | |||
130 | (struct nv_pmu_clk_clk_vin_device_boardobjgrp_set_header *) | 130 | (struct nv_pmu_clk_clk_vin_device_boardobjgrp_set_header *) |
131 | pboardobjgrppmu; | 131 | pboardobjgrppmu; |
132 | struct avfsvinobjs *pvin_obbj = (struct avfsvinobjs *)pboardobjgrp; | 132 | struct avfsvinobjs *pvin_obbj = (struct avfsvinobjs *)pboardobjgrp; |
133 | u32 status = 0; | 133 | int status = 0; |
134 | 134 | ||
135 | nvgpu_log_info(g, " "); | 135 | nvgpu_log_info(g, " "); |
136 | 136 | ||
@@ -142,7 +142,7 @@ static u32 _clk_vin_devgrp_pmudatainit_super(struct gk20a *g, | |||
142 | return status; | 142 | return status; |
143 | } | 143 | } |
144 | 144 | ||
145 | static u32 _clk_vin_devgrp_pmudata_instget(struct gk20a *g, | 145 | static int _clk_vin_devgrp_pmudata_instget(struct gk20a *g, |
146 | struct nv_pmu_boardobjgrp *pmuboardobjgrp, | 146 | struct nv_pmu_boardobjgrp *pmuboardobjgrp, |
147 | struct nv_pmu_boardobj **ppboardobjpmudata, | 147 | struct nv_pmu_boardobj **ppboardobjpmudata, |
148 | u8 idx) | 148 | u8 idx) |
@@ -165,7 +165,7 @@ static u32 _clk_vin_devgrp_pmudata_instget(struct gk20a *g, | |||
165 | return 0; | 165 | return 0; |
166 | } | 166 | } |
167 | 167 | ||
168 | static u32 _clk_vin_devgrp_pmustatus_instget(struct gk20a *g, | 168 | static int _clk_vin_devgrp_pmustatus_instget(struct gk20a *g, |
169 | void *pboardobjgrppmu, | 169 | void *pboardobjgrppmu, |
170 | struct nv_pmu_boardobj_query **ppboardobjpmustatus, | 170 | struct nv_pmu_boardobj_query **ppboardobjpmustatus, |
171 | u8 idx) | 171 | u8 idx) |
@@ -185,9 +185,9 @@ static u32 _clk_vin_devgrp_pmustatus_instget(struct gk20a *g, | |||
185 | return 0; | 185 | return 0; |
186 | } | 186 | } |
187 | 187 | ||
188 | u32 clk_vin_sw_setup(struct gk20a *g) | 188 | int clk_vin_sw_setup(struct gk20a *g) |
189 | { | 189 | { |
190 | u32 status; | 190 | int status; |
191 | struct boardobjgrp *pboardobjgrp = NULL; | 191 | struct boardobjgrp *pboardobjgrp = NULL; |
192 | struct vin_device_v20 *pvindev = NULL; | 192 | struct vin_device_v20 *pvindev = NULL; |
193 | struct avfsvinobjs *pvinobjs; | 193 | struct avfsvinobjs *pvinobjs; |
@@ -243,9 +243,9 @@ done: | |||
243 | return status; | 243 | return status; |
244 | } | 244 | } |
245 | 245 | ||
246 | u32 clk_vin_pmu_setup(struct gk20a *g) | 246 | int clk_vin_pmu_setup(struct gk20a *g) |
247 | { | 247 | { |
248 | u32 status; | 248 | int status; |
249 | struct boardobjgrp *pboardobjgrp = NULL; | 249 | struct boardobjgrp *pboardobjgrp = NULL; |
250 | 250 | ||
251 | nvgpu_log_info(g, " "); | 251 | nvgpu_log_info(g, " "); |
@@ -262,10 +262,10 @@ u32 clk_vin_pmu_setup(struct gk20a *g) | |||
262 | return status; | 262 | return status; |
263 | } | 263 | } |
264 | 264 | ||
265 | static u32 devinit_get_vin_device_table(struct gk20a *g, | 265 | static int devinit_get_vin_device_table(struct gk20a *g, |
266 | struct avfsvinobjs *pvinobjs) | 266 | struct avfsvinobjs *pvinobjs) |
267 | { | 267 | { |
268 | u32 status = 0; | 268 | int status = 0; |
269 | u8 *vin_table_ptr = NULL; | 269 | u8 *vin_table_ptr = NULL; |
270 | struct vin_descriptor_header_10 vin_desc_table_header = { 0 }; | 270 | struct vin_descriptor_header_10 vin_desc_table_header = { 0 }; |
271 | struct vin_descriptor_entry_10 vin_desc_table_entry = { 0 }; | 271 | struct vin_descriptor_entry_10 vin_desc_table_entry = { 0 }; |
@@ -376,14 +376,14 @@ done: | |||
376 | return status; | 376 | return status; |
377 | } | 377 | } |
378 | 378 | ||
379 | static u32 vin_device_construct_v10(struct gk20a *g, | 379 | static int vin_device_construct_v10(struct gk20a *g, |
380 | struct boardobj **ppboardobj, | 380 | struct boardobj **ppboardobj, |
381 | u16 size, void *pargs) | 381 | u16 size, void *pargs) |
382 | { | 382 | { |
383 | struct boardobj *ptmpobj = (struct boardobj *)pargs; | 383 | struct boardobj *ptmpobj = (struct boardobj *)pargs; |
384 | struct vin_device_v10 *pvin_device_v10; | 384 | struct vin_device_v10 *pvin_device_v10; |
385 | struct vin_device_v10 *ptmpvin_device_v10 = (struct vin_device_v10 *)pargs; | 385 | struct vin_device_v10 *ptmpvin_device_v10 = (struct vin_device_v10 *)pargs; |
386 | u32 status = 0; | 386 | int status = 0; |
387 | 387 | ||
388 | if (BOARDOBJ_GET_TYPE(pargs) != CTRL_CLK_VIN_TYPE_V10) { | 388 | if (BOARDOBJ_GET_TYPE(pargs) != CTRL_CLK_VIN_TYPE_V10) { |
389 | return -EINVAL; | 389 | return -EINVAL; |
@@ -406,14 +406,14 @@ static u32 vin_device_construct_v10(struct gk20a *g, | |||
406 | return status; | 406 | return status; |
407 | } | 407 | } |
408 | 408 | ||
409 | static u32 vin_device_construct_v20(struct gk20a *g, | 409 | static int vin_device_construct_v20(struct gk20a *g, |
410 | struct boardobj **ppboardobj, | 410 | struct boardobj **ppboardobj, |
411 | u16 size, void *pargs) | 411 | u16 size, void *pargs) |
412 | { | 412 | { |
413 | struct boardobj *ptmpobj = (struct boardobj *)pargs; | 413 | struct boardobj *ptmpobj = (struct boardobj *)pargs; |
414 | struct vin_device_v20 *pvin_device_v20; | 414 | struct vin_device_v20 *pvin_device_v20; |
415 | struct vin_device_v20 *ptmpvin_device_v20 = (struct vin_device_v20 *)pargs; | 415 | struct vin_device_v20 *ptmpvin_device_v20 = (struct vin_device_v20 *)pargs; |
416 | u32 status = 0; | 416 | int status = 0; |
417 | 417 | ||
418 | if (BOARDOBJ_GET_TYPE(pargs) != CTRL_CLK_VIN_TYPE_V20) { | 418 | if (BOARDOBJ_GET_TYPE(pargs) != CTRL_CLK_VIN_TYPE_V20) { |
419 | return -EINVAL; | 419 | return -EINVAL; |
@@ -435,13 +435,13 @@ static u32 vin_device_construct_v20(struct gk20a *g, | |||
435 | 435 | ||
436 | return status; | 436 | return status; |
437 | } | 437 | } |
438 | static u32 vin_device_construct_super(struct gk20a *g, | 438 | static int vin_device_construct_super(struct gk20a *g, |
439 | struct boardobj **ppboardobj, | 439 | struct boardobj **ppboardobj, |
440 | u16 size, void *pargs) | 440 | u16 size, void *pargs) |
441 | { | 441 | { |
442 | struct vin_device *pvin_device; | 442 | struct vin_device *pvin_device; |
443 | struct vin_device *ptmpvin_device = (struct vin_device *)pargs; | 443 | struct vin_device *ptmpvin_device = (struct vin_device *)pargs; |
444 | u32 status = 0; | 444 | int status = 0; |
445 | status = boardobj_construct_super(g, ppboardobj, size, pargs); | 445 | status = boardobj_construct_super(g, ppboardobj, size, pargs); |
446 | 446 | ||
447 | if (status) { | 447 | if (status) { |
@@ -463,7 +463,7 @@ static u32 vin_device_construct_super(struct gk20a *g, | |||
463 | static struct vin_device *construct_vin_device(struct gk20a *g, void *pargs) | 463 | static struct vin_device *construct_vin_device(struct gk20a *g, void *pargs) |
464 | { | 464 | { |
465 | struct boardobj *board_obj_ptr = NULL; | 465 | struct boardobj *board_obj_ptr = NULL; |
466 | u32 status; | 466 | int status; |
467 | 467 | ||
468 | nvgpu_log_info(g, " %d", BOARDOBJ_GET_TYPE(pargs)); | 468 | nvgpu_log_info(g, " %d", BOARDOBJ_GET_TYPE(pargs)); |
469 | switch (BOARDOBJ_GET_TYPE(pargs)) { | 469 | switch (BOARDOBJ_GET_TYPE(pargs)) { |
@@ -492,11 +492,11 @@ static struct vin_device *construct_vin_device(struct gk20a *g, void *pargs) | |||
492 | 492 | ||
493 | 493 | ||
494 | 494 | ||
495 | static u32 vin_device_init_pmudata_v10(struct gk20a *g, | 495 | static int vin_device_init_pmudata_v10(struct gk20a *g, |
496 | struct boardobj *board_obj_ptr, | 496 | struct boardobj *board_obj_ptr, |
497 | struct nv_pmu_boardobj *ppmudata) | 497 | struct nv_pmu_boardobj *ppmudata) |
498 | { | 498 | { |
499 | u32 status = 0; | 499 | int status = 0; |
500 | struct vin_device_v20 *pvin_dev_v20; | 500 | struct vin_device_v20 *pvin_dev_v20; |
501 | struct nv_pmu_clk_clk_vin_device_v10_boardobj_set *perf_pmu_data; | 501 | struct nv_pmu_clk_clk_vin_device_v10_boardobj_set *perf_pmu_data; |
502 | 502 | ||
@@ -519,11 +519,11 @@ static u32 vin_device_init_pmudata_v10(struct gk20a *g, | |||
519 | return status; | 519 | return status; |
520 | } | 520 | } |
521 | 521 | ||
522 | static u32 vin_device_init_pmudata_v20(struct gk20a *g, | 522 | static int vin_device_init_pmudata_v20(struct gk20a *g, |
523 | struct boardobj *board_obj_ptr, | 523 | struct boardobj *board_obj_ptr, |
524 | struct nv_pmu_boardobj *ppmudata) | 524 | struct nv_pmu_boardobj *ppmudata) |
525 | { | 525 | { |
526 | u32 status = 0; | 526 | int status = 0; |
527 | struct vin_device_v20 *pvin_dev_v20; | 527 | struct vin_device_v20 *pvin_dev_v20; |
528 | struct nv_pmu_clk_clk_vin_device_v20_boardobj_set *perf_pmu_data; | 528 | struct nv_pmu_clk_clk_vin_device_v20_boardobj_set *perf_pmu_data; |
529 | 529 | ||
@@ -546,11 +546,11 @@ static u32 vin_device_init_pmudata_v20(struct gk20a *g, | |||
546 | return status; | 546 | return status; |
547 | } | 547 | } |
548 | 548 | ||
549 | static u32 vin_device_init_pmudata_super(struct gk20a *g, | 549 | static int vin_device_init_pmudata_super(struct gk20a *g, |
550 | struct boardobj *board_obj_ptr, | 550 | struct boardobj *board_obj_ptr, |
551 | struct nv_pmu_boardobj *ppmudata) | 551 | struct nv_pmu_boardobj *ppmudata) |
552 | { | 552 | { |
553 | u32 status = 0; | 553 | int status = 0; |
554 | struct vin_device *pvin_dev; | 554 | struct vin_device *pvin_dev; |
555 | struct nv_pmu_clk_clk_vin_device_boardobj_set *perf_pmu_data; | 555 | struct nv_pmu_clk_clk_vin_device_boardobj_set *perf_pmu_data; |
556 | 556 | ||
diff --git a/drivers/gpu/nvgpu/clk/clk_vin.h b/drivers/gpu/nvgpu/clk/clk_vin.h index 209e7055..9396c848 100644 --- a/drivers/gpu/nvgpu/clk/clk_vin.h +++ b/drivers/gpu/nvgpu/clk/clk_vin.h | |||
@@ -67,8 +67,8 @@ struct vin_device_v20 { | |||
67 | boardobj_construct construct_vindevice; | 67 | boardobj_construct construct_vindevice; |
68 | boardobj_pmudatainit vindeviceinit_pmudata_super; | 68 | boardobj_pmudatainit vindeviceinit_pmudata_super; |
69 | 69 | ||
70 | u32 clk_vin_sw_setup(struct gk20a *g); | 70 | int clk_vin_sw_setup(struct gk20a *g); |
71 | u32 clk_vin_pmu_setup(struct gk20a *g); | 71 | int clk_vin_pmu_setup(struct gk20a *g); |
72 | u32 clk_avfs_get_vin_cal_fuse_v10(struct gk20a *g, | 72 | u32 clk_avfs_get_vin_cal_fuse_v10(struct gk20a *g, |
73 | struct avfsvinobjs *pvinobjs, | 73 | struct avfsvinobjs *pvinobjs, |
74 | struct vin_device_v20 *pvindev); | 74 | struct vin_device_v20 *pvindev); |