Lines Matching refs:postdiv
68 u32 pcw, int postdiv) in __mtk_pll_recalc_rate() argument
91 return ((unsigned long)vco + postdiv - 1) / postdiv; in __mtk_pll_recalc_rate()
121 int postdiv) in mtk_pll_set_rate_regs() argument
131 val |= (ffs(postdiv) - 1) << pll->data->pd_shift; in mtk_pll_set_rate_regs()
164 static void mtk_pll_calc_values(struct mtk_clk_pll *pll, u32 *pcw, u32 *postdiv, in mtk_pll_calc_values() argument
184 *postdiv = 1 << val; in mtk_pll_calc_values()
187 *postdiv = 1 << val; in mtk_pll_calc_values()
188 if ((u64)freq * *postdiv >= fmin) in mtk_pll_calc_values()
206 u32 postdiv; in mtk_pll_set_rate() local
208 mtk_pll_calc_values(pll, &pcw, &postdiv, rate, parent_rate); in mtk_pll_set_rate()
209 mtk_pll_set_rate_regs(pll, pcw, postdiv); in mtk_pll_set_rate()
218 u32 postdiv; in mtk_pll_recalc_rate() local
221 postdiv = (readl(pll->pd_addr) >> pll->data->pd_shift) & POSTDIV_MASK; in mtk_pll_recalc_rate()
222 postdiv = 1 << postdiv; in mtk_pll_recalc_rate()
227 return __mtk_pll_recalc_rate(pll, parent_rate, pcw, postdiv); in mtk_pll_recalc_rate()
235 int postdiv; in mtk_pll_round_rate() local
237 mtk_pll_calc_values(pll, &pcw, &postdiv, rate, *prate); in mtk_pll_round_rate()
239 return __mtk_pll_recalc_rate(pll, *prate, pcw, postdiv); in mtk_pll_round_rate()