Lines Matching refs:pres
386 u32 pres; in clk_master_pres_determine_rate() local
398 pres = 3; in clk_master_pres_determine_rate()
400 pres = 1 << i; in clk_master_pres_determine_rate()
402 req_parent.rate = req->rate * pres; in clk_master_pres_determine_rate()
407 &best_diff, &best_rate, pres); in clk_master_pres_determine_rate()
420 unsigned int pres, mckr, tmp; in clk_master_pres_set_rate() local
423 pres = DIV_ROUND_CLOSEST(parent_rate, rate); in clk_master_pres_set_rate()
424 if (pres > MASTER_PRES_MAX) in clk_master_pres_set_rate()
427 else if (pres == 3) in clk_master_pres_set_rate()
428 pres = MASTER_PRES_MAX; in clk_master_pres_set_rate()
429 else if (pres) in clk_master_pres_set_rate()
430 pres = ffs(pres) - 1; in clk_master_pres_set_rate()
439 if (pres == tmp) in clk_master_pres_set_rate()
443 mckr |= (pres << master->layout->pres_shift); in clk_master_pres_set_rate()
463 unsigned int val, pres; in clk_master_pres_recalc_rate() local
470 pres = (val >> master->layout->pres_shift) & MASTER_PRES_MASK; in clk_master_pres_recalc_rate()
471 if (pres == MASTER_PRES_MAX && characteristics->have_div3_pres) in clk_master_pres_recalc_rate()
472 pres = 3; in clk_master_pres_recalc_rate()
474 pres = (1 << pres); in clk_master_pres_recalc_rate()
476 return DIV_ROUND_CLOSEST_ULL(parent_rate, pres); in clk_master_pres_recalc_rate()
499 unsigned int val, pres; in clk_master_pres_save_context() local
506 pres = (val >> master->layout->pres_shift) & MASTER_PRES_MASK; in clk_master_pres_save_context()
507 if (pres == MASTER_PRES_MAX && master->characteristics->have_div3_pres) in clk_master_pres_save_context()
508 pres = 3; in clk_master_pres_save_context()
510 pres = (1 << pres); in clk_master_pres_save_context()
514 master->pms.rate = DIV_ROUND_CLOSEST_ULL(master->pms.parent_rate, pres); in clk_master_pres_save_context()
523 unsigned int val, pres; in clk_master_pres_restore_context() local
530 pres = (val >> master->layout->pres_shift) & MASTER_PRES_MASK; in clk_master_pres_restore_context()
531 if (pres == MASTER_PRES_MAX && master->characteristics->have_div3_pres) in clk_master_pres_restore_context()
532 pres = 3; in clk_master_pres_restore_context()
534 pres = (1 << pres); in clk_master_pres_restore_context()
537 DIV_ROUND_CLOSEST_ULL(master->pms.parent_rate, pres) || in clk_master_pres_restore_context()