@@ -119,19 +119,19 @@ static unsigned long clk_pll_recalc_rate(struct clk_hw *hw,
119
119
return rate ;
120
120
}
121
121
122
- static long clk_pll_round_rate (struct clk_hw * hw , unsigned long rate ,
123
- unsigned long * prate )
122
+ static int clk_pll_determine_rate (struct clk_hw * hw ,
123
+ struct clk_rate_request * req )
124
124
{
125
- u64 parent_rate = * prate ;
125
+ u64 parent_rate = req -> best_parent_rate ;
126
126
u32 divff , divfi ;
127
127
u64 temp64 ;
128
128
129
129
parent_rate *= 8 ;
130
- rate *= 2 ;
131
- temp64 = rate ;
130
+ req -> rate *= 2 ;
131
+ temp64 = req -> rate ;
132
132
do_div (temp64 , parent_rate );
133
133
divfi = temp64 ;
134
- temp64 = rate - divfi * parent_rate ;
134
+ temp64 = req -> rate - divfi * parent_rate ;
135
135
temp64 *= PLL_FRAC_DENOM ;
136
136
do_div (temp64 , parent_rate );
137
137
divff = temp64 ;
@@ -140,9 +140,11 @@ static long clk_pll_round_rate(struct clk_hw *hw, unsigned long rate,
140
140
temp64 *= divff ;
141
141
do_div (temp64 , PLL_FRAC_DENOM );
142
142
143
- rate = parent_rate * divfi + temp64 ;
143
+ req -> rate = parent_rate * divfi + temp64 ;
144
+
145
+ req -> rate = req -> rate / 2 ;
144
146
145
- return rate / 2 ;
147
+ return 0 ;
146
148
}
147
149
148
150
/*
@@ -198,7 +200,7 @@ static const struct clk_ops clk_frac_pll_ops = {
198
200
.unprepare = clk_pll_unprepare ,
199
201
.is_prepared = clk_pll_is_prepared ,
200
202
.recalc_rate = clk_pll_recalc_rate ,
201
- .round_rate = clk_pll_round_rate ,
203
+ .determine_rate = clk_pll_determine_rate ,
202
204
.set_rate = clk_pll_set_rate ,
203
205
};
204
206
0 commit comments