@@ -91,8 +91,8 @@ static unsigned long ccu_gate_recalc_rate(struct clk_hw *hw,
91
91
return rate ;
92
92
}
93
93
94
- static long ccu_gate_round_rate (struct clk_hw * hw , unsigned long rate ,
95
- unsigned long * prate )
94
+ static int ccu_gate_determine_rate (struct clk_hw * hw ,
95
+ struct clk_rate_request * req )
96
96
{
97
97
struct ccu_gate * cg = hw_to_ccu_gate (hw );
98
98
int div = 1 ;
@@ -101,14 +101,16 @@ static long ccu_gate_round_rate(struct clk_hw *hw, unsigned long rate,
101
101
div = cg -> common .prediv ;
102
102
103
103
if (clk_hw_get_flags (hw ) & CLK_SET_RATE_PARENT ) {
104
- unsigned long best_parent = rate ;
104
+ unsigned long best_parent = req -> rate ;
105
105
106
106
if (cg -> common .features & CCU_FEATURE_ALL_PREDIV )
107
107
best_parent *= div ;
108
- * prate = clk_hw_round_rate (clk_hw_get_parent (hw ), best_parent );
108
+ req -> best_parent_rate = clk_hw_round_rate (clk_hw_get_parent (hw ), best_parent );
109
109
}
110
110
111
- return * prate / div ;
111
+ req -> rate = req -> best_parent_rate / div ;
112
+
113
+ return 0 ;
112
114
}
113
115
114
116
static int ccu_gate_set_rate (struct clk_hw * hw , unsigned long rate ,
@@ -127,7 +129,7 @@ const struct clk_ops ccu_gate_ops = {
127
129
.disable = ccu_gate_disable ,
128
130
.enable = ccu_gate_enable ,
129
131
.is_enabled = ccu_gate_is_enabled ,
130
- .round_rate = ccu_gate_round_rate ,
132
+ .determine_rate = ccu_gate_determine_rate ,
131
133
.set_rate = ccu_gate_set_rate ,
132
134
.recalc_rate = ccu_gate_recalc_rate ,
133
135
};
0 commit comments