@@ -92,26 +92,26 @@ static unsigned long ccu_nk_recalc_rate(struct clk_hw *hw,
92
92
return rate ;
93
93
}
94
94
95
- static long ccu_nk_round_rate (struct clk_hw * hw , unsigned long rate ,
96
- unsigned long * parent_rate )
95
+ static int ccu_nk_determine_rate (struct clk_hw * hw ,
96
+ struct clk_rate_request * req )
97
97
{
98
98
struct ccu_nk * nk = hw_to_ccu_nk (hw );
99
99
struct _ccu_nk _nk ;
100
100
101
101
if (nk -> common .features & CCU_FEATURE_FIXED_POSTDIV )
102
- rate *= nk -> fixed_post_div ;
102
+ req -> rate *= nk -> fixed_post_div ;
103
103
104
104
_nk .min_n = nk -> n .min ?: 1 ;
105
105
_nk .max_n = nk -> n .max ?: 1 << nk -> n .width ;
106
106
_nk .min_k = nk -> k .min ?: 1 ;
107
107
_nk .max_k = nk -> k .max ?: 1 << nk -> k .width ;
108
108
109
- rate = ccu_nk_find_best (* parent_rate , rate , & _nk );
109
+ req -> rate = ccu_nk_find_best (req -> best_parent_rate , req -> rate , & _nk );
110
110
111
111
if (nk -> common .features & CCU_FEATURE_FIXED_POSTDIV )
112
- rate = rate / nk -> fixed_post_div ;
112
+ req -> rate = req -> rate / nk -> fixed_post_div ;
113
113
114
- return rate ;
114
+ return 0 ;
115
115
}
116
116
117
117
static int ccu_nk_set_rate (struct clk_hw * hw , unsigned long rate ,
@@ -155,7 +155,7 @@ const struct clk_ops ccu_nk_ops = {
155
155
.is_enabled = ccu_nk_is_enabled ,
156
156
157
157
.recalc_rate = ccu_nk_recalc_rate ,
158
- .round_rate = ccu_nk_round_rate ,
158
+ .determine_rate = ccu_nk_determine_rate ,
159
159
.set_rate = ccu_nk_set_rate ,
160
160
};
161
161
EXPORT_SYMBOL_NS_GPL (ccu_nk_ops , "SUNXI_CCU" );
0 commit comments