Lines Matching refs:pre_div
113 static u32 ns_to_pre_div(struct pre_div *p, u32 ns) in ns_to_pre_div()
120 static u32 pre_div_to_ns(struct pre_div *p, u8 pre_div, u32 ns) in pre_div_to_ns() argument
128 ns |= pre_div << p->pre_div_shift; in pre_div_to_ns()
203 struct pre_div *p; in configure_bank()
267 ns = pre_div_to_ns(p, f->pre_div - 1, ns); in configure_bank()
312 f.pre_div = ns_to_pre_div(&rcg->p[bank], ns) + 1; in clk_dyn_rcg_set_parent()
326 calc_rate(unsigned long rate, u32 m, u32 n, u32 mode, u32 pre_div) in calc_rate() argument
328 if (pre_div) in calc_rate()
329 rate /= pre_div + 1; in calc_rate()
345 u32 pre_div, m = 0, n = 0, ns, md, mode = 0; in clk_rcg_recalc_rate() local
349 pre_div = ns_to_pre_div(&rcg->p, ns); in clk_rcg_recalc_rate()
363 return calc_rate(parent_rate, m, n, mode, pre_div); in clk_rcg_recalc_rate()
370 u32 m, n, pre_div, ns, md, mode, reg; in clk_dyn_rcg_recalc_rate() local
380 m = n = pre_div = mode = 0; in clk_dyn_rcg_recalc_rate()
394 pre_div = ns_to_pre_div(&rcg->p[bank], ns); in clk_dyn_rcg_recalc_rate()
396 return calc_rate(parent_rate, m, n, mode, pre_div); in clk_dyn_rcg_recalc_rate()
418 rate = rate * f->pre_div; in _freq_tbl_determine_rate()
508 ns = pre_div_to_ns(&rcg->p, f->pre_div - 1, ns); in __clk_rcg_set_rate()
575 f.pre_div = ns_to_pre_div(&rcg->p, ns) + 1; in clk_rcg_bypass2_set_rate()
655 f.pre_div = 1; in clk_rcg_pixel_set_rate()
733 f.pre_div = div; in clk_rcg_esc_set_rate()