Lines Matching full:div
45 u8 div; member
79 u8 div; in clk_master_recalc_rate() local
91 div = (mckr >> MASTER_DIV_SHIFT) & MASTER_DIV_MASK; in clk_master_recalc_rate()
98 rate /= characteristics->divisors[div]; in clk_master_recalc_rate()
171 return DIV_ROUND_CLOSEST_ULL(parent_rate, (1 << master->div)); in clk_sama7g5_master_recalc_rate()
179 u32 div) in clk_sama7g5_master_best_diff() argument
183 if (div == MASTER_PRES_MAX) in clk_sama7g5_master_best_diff()
186 tmp_rate = parent_rate >> div; in clk_sama7g5_master_best_diff()
206 unsigned int div, i; in clk_sama7g5_master_determine_rate() local
218 for (div = 0; div < MASTER_PRES_MAX + 1; div++) { in clk_sama7g5_master_determine_rate()
221 div); in clk_sama7g5_master_determine_rate()
238 for (div = 0; div < MASTER_PRES_MAX + 1; div++) { in clk_sama7g5_master_determine_rate()
239 if (div == MASTER_PRES_MAX) in clk_sama7g5_master_determine_rate()
242 req_parent.rate = req->rate << div; in clk_sama7g5_master_determine_rate()
248 &best_rate, &best_diff, div); in clk_sama7g5_master_determine_rate()
311 (master->div << MASTER_DIV_SHIFT) | in clk_sama7g5_master_enable()
360 unsigned long div, flags; in clk_sama7g5_master_set_rate() local
362 div = DIV_ROUND_CLOSEST(parent_rate, rate); in clk_sama7g5_master_set_rate()
363 if ((div > (1 << (MASTER_PRES_MAX - 1))) || (div & (div - 1))) in clk_sama7g5_master_set_rate()
366 if (div == 3) in clk_sama7g5_master_set_rate()
367 div = MASTER_PRES_MAX; in clk_sama7g5_master_set_rate()
369 div = ffs(div) - 1; in clk_sama7g5_master_set_rate()
372 master->div = div; in clk_sama7g5_master_set_rate()
433 master->div = (val & PMC_MCR_DIV) >> MASTER_DIV_SHIFT; in at91_clk_sama7g5_register_master()