File tree Expand file tree Collapse file tree 1 file changed +10
-8
lines changed Expand file tree Collapse file tree 1 file changed +10
-8
lines changed Original file line number Diff line number Diff line change @@ -62,24 +62,26 @@ static unsigned long clk_pfd_recalc_rate(struct clk_hw *hw,
62
62
return tmp ;
63
63
}
64
64
65
- static long clk_pfd_round_rate (struct clk_hw * hw , unsigned long rate ,
66
- unsigned long * prate )
65
+ static int clk_pfd_determine_rate (struct clk_hw * hw ,
66
+ struct clk_rate_request * req )
67
67
{
68
- u64 tmp = * prate ;
68
+ u64 tmp = req -> best_parent_rate ;
69
69
u8 frac ;
70
70
71
- tmp = tmp * 18 + rate / 2 ;
72
- do_div (tmp , rate );
71
+ tmp = tmp * 18 + req -> rate / 2 ;
72
+ do_div (tmp , req -> rate );
73
73
frac = tmp ;
74
74
if (frac < 12 )
75
75
frac = 12 ;
76
76
else if (frac > 35 )
77
77
frac = 35 ;
78
- tmp = * prate ;
78
+ tmp = req -> best_parent_rate ;
79
79
tmp *= 18 ;
80
80
do_div (tmp , frac );
81
81
82
- return tmp ;
82
+ req -> rate = tmp ;
83
+
84
+ return 0 ;
83
85
}
84
86
85
87
static int clk_pfd_set_rate (struct clk_hw * hw , unsigned long rate ,
@@ -117,7 +119,7 @@ static const struct clk_ops clk_pfd_ops = {
117
119
.enable = clk_pfd_enable ,
118
120
.disable = clk_pfd_disable ,
119
121
.recalc_rate = clk_pfd_recalc_rate ,
120
- .round_rate = clk_pfd_round_rate ,
122
+ .determine_rate = clk_pfd_determine_rate ,
121
123
.set_rate = clk_pfd_set_rate ,
122
124
.is_enabled = clk_pfd_is_enabled ,
123
125
};
You can’t perform that action at this time.
0 commit comments