Lines Matching refs:div
23 int mux_div_set_src_div(struct clk_regmap_mux_div *md, u32 src, u32 div) in mux_div_set_src_div() argument
29 val = (div << md->hid_shift) | (src << md->src_shift); in mux_div_set_src_div()
60 u32 *div) in mux_div_get_src_div() argument
79 *div = d; in mux_div_get_src_div()
92 unsigned int i, div, max_div; in mux_div_determine_rate() local
101 for (div = 1; div < max_div; div++) { in mux_div_determine_rate()
102 parent_rate = mult_frac(req_rate, div, 2); in mux_div_determine_rate()
104 actual_rate = mult_frac(parent_rate, 2, div); in mux_div_determine_rate()
129 u32 div, max_div, best_src = 0, best_div = 0; in __mux_div_set_rate_and_parent() local
138 for (div = 1; div < max_div; div++) { in __mux_div_set_rate_and_parent()
139 parent_rate = mult_frac(rate, div, 2); in __mux_div_set_rate_and_parent()
141 actual_rate = mult_frac(parent_rate, 2, div); in __mux_div_set_rate_and_parent()
146 best_div = div - 1; in __mux_div_set_rate_and_parent()
156 md->div = best_div; in __mux_div_set_rate_and_parent()
167 u32 i, div, src = 0; in mux_div_get_parent() local
169 mux_div_get_src_div(md, &src, &div); in mux_div_get_parent()
183 return mux_div_set_src_div(md, md->parent_map[index], md->div); in mux_div_set_parent()
206 u32 div, src; in mux_div_recalc_rate() local
210 mux_div_get_src_div(md, &src, &div); in mux_div_recalc_rate()
216 return mult_frac(parent_rate, 2, div + 1); in mux_div_recalc_rate()