@@ -134,20 +134,25 @@ imx_get_pll_settings(struct clk_fracn_gppll *pll, unsigned long rate)
134
134
return NULL ;
135
135
}
136
136
137
- static long clk_fracn_gppll_round_rate (struct clk_hw * hw , unsigned long rate ,
138
- unsigned long * prate )
137
+ static int clk_fracn_gppll_determine_rate (struct clk_hw * hw ,
138
+ struct clk_rate_request * req )
139
139
{
140
140
struct clk_fracn_gppll * pll = to_clk_fracn_gppll (hw );
141
141
const struct imx_fracn_gppll_rate_table * rate_table = pll -> rate_table ;
142
142
int i ;
143
143
144
144
/* Assuming rate_table is in descending order */
145
145
for (i = 0 ; i < pll -> rate_count ; i ++ )
146
- if (rate >= rate_table [i ].rate )
147
- return rate_table [i ].rate ;
146
+ if (req -> rate >= rate_table [i ].rate ) {
147
+ req -> rate = rate_table [i ].rate ;
148
+
149
+ return 0 ;
150
+ }
148
151
149
152
/* return minimum supported value */
150
- return rate_table [pll -> rate_count - 1 ].rate ;
153
+ req -> rate = rate_table [pll -> rate_count - 1 ].rate ;
154
+
155
+ return 0 ;
151
156
}
152
157
153
158
static unsigned long clk_fracn_gppll_recalc_rate (struct clk_hw * hw , unsigned long parent_rate )
@@ -345,7 +350,7 @@ static const struct clk_ops clk_fracn_gppll_ops = {
345
350
.unprepare = clk_fracn_gppll_unprepare ,
346
351
.is_prepared = clk_fracn_gppll_is_prepared ,
347
352
.recalc_rate = clk_fracn_gppll_recalc_rate ,
348
- .round_rate = clk_fracn_gppll_round_rate ,
353
+ .determine_rate = clk_fracn_gppll_determine_rate ,
349
354
.set_rate = clk_fracn_gppll_set_rate ,
350
355
};
351
356
0 commit comments