Lines Matching refs:pres
229 static void __init mchp_pit64b_pres_compute(u32 *pres, u32 clk_rate, in mchp_pit64b_pres_compute() argument
234 for (*pres = 0; *pres < MCHP_PIT64B_PRES_MAX; (*pres)++) { in mchp_pit64b_pres_compute()
235 tmp = clk_rate / (*pres + 1); in mchp_pit64b_pres_compute()
241 if (*pres == MCHP_PIT64B_PRES_MAX) in mchp_pit64b_pres_compute()
242 *pres = MCHP_PIT64B_PRES_MAX - 1; in mchp_pit64b_pres_compute()
284 u32 pres, best_pres = 0; in mchp_pit64b_init_mode() local
300 mchp_pit64b_pres_compute(&pres, gclk_round, max_rate); in mchp_pit64b_init_mode()
301 best_diff = abs(gclk_round / (pres + 1) - max_rate); in mchp_pit64b_init_mode()
302 best_pres = pres; in mchp_pit64b_init_mode()
312 mchp_pit64b_pres_compute(&pres, pclk_rate, max_rate); in mchp_pit64b_init_mode()
313 diff = abs(pclk_rate / (pres + 1) - max_rate); in mchp_pit64b_init_mode()
317 best_pres = pres; in mchp_pit64b_init_mode()