Lines Matching refs:rate

119 static long clk_pllv3_round_rate(struct clk_hw *hw, unsigned long rate,  in clk_pllv3_round_rate()  argument
124 return (rate >= parent_rate * 22) ? parent_rate * 22 : in clk_pllv3_round_rate()
128 static int clk_pllv3_set_rate(struct clk_hw *hw, unsigned long rate, in clk_pllv3_set_rate() argument
134 if (rate == parent_rate * 22) in clk_pllv3_set_rate()
136 else if (rate == parent_rate * 20) in clk_pllv3_set_rate()
167 static long clk_pllv3_sys_round_rate(struct clk_hw *hw, unsigned long rate, in clk_pllv3_sys_round_rate() argument
175 if (rate > max_rate) in clk_pllv3_sys_round_rate()
176 rate = max_rate; in clk_pllv3_sys_round_rate()
177 else if (rate < min_rate) in clk_pllv3_sys_round_rate()
178 rate = min_rate; in clk_pllv3_sys_round_rate()
179 div = rate * 2 / parent_rate; in clk_pllv3_sys_round_rate()
184 static int clk_pllv3_sys_set_rate(struct clk_hw *hw, unsigned long rate, in clk_pllv3_sys_set_rate() argument
192 if (rate < min_rate || rate > max_rate) in clk_pllv3_sys_set_rate()
195 div = rate * 2 / parent_rate; in clk_pllv3_sys_set_rate()
228 static long clk_pllv3_av_round_rate(struct clk_hw *hw, unsigned long rate, in clk_pllv3_av_round_rate() argument
239 if (rate > max_rate) in clk_pllv3_av_round_rate()
240 rate = max_rate; in clk_pllv3_av_round_rate()
241 else if (rate < min_rate) in clk_pllv3_av_round_rate()
242 rate = min_rate; in clk_pllv3_av_round_rate()
247 div = rate / parent_rate; in clk_pllv3_av_round_rate()
248 temp64 = (u64) (rate - div * parent_rate); in clk_pllv3_av_round_rate()
260 static int clk_pllv3_av_set_rate(struct clk_hw *hw, unsigned long rate, in clk_pllv3_av_set_rate() argument
271 if (rate < min_rate || rate > max_rate) in clk_pllv3_av_set_rate()
277 div = rate / parent_rate; in clk_pllv3_av_set_rate()
278 temp64 = (u64) (rate - div * parent_rate); in clk_pllv3_av_set_rate()
321 unsigned long parent_rate, unsigned long rate) in clk_pllv3_vf610_rate_to_mf() argument
326 mf.mfi = (rate >= 22 * parent_rate) ? 22 : 20; in clk_pllv3_vf610_rate_to_mf()
329 if (rate <= parent_rate * mf.mfi) in clk_pllv3_vf610_rate_to_mf()
331 else if (rate >= parent_rate * (mf.mfi + 1)) in clk_pllv3_vf610_rate_to_mf()
335 temp64 = rate - parent_rate * mf.mfi; in clk_pllv3_vf610_rate_to_mf()
357 static long clk_pllv3_vf610_round_rate(struct clk_hw *hw, unsigned long rate, in clk_pllv3_vf610_round_rate() argument
360 struct clk_pllv3_vf610_mf mf = clk_pllv3_vf610_rate_to_mf(*prate, rate); in clk_pllv3_vf610_round_rate()
365 static int clk_pllv3_vf610_set_rate(struct clk_hw *hw, unsigned long rate, in clk_pllv3_vf610_set_rate() argument
370 clk_pllv3_vf610_rate_to_mf(parent_rate, rate); in clk_pllv3_vf610_set_rate()