Lines Matching full:gclk
54 * @gclk: PIT64B's generic clock
60 struct clk *gclk; member
165 clk_disable_unprepare(timer->gclk); in mchp_pit64b_clkevt_suspend()
175 clk_prepare_enable(timer->gclk); in mchp_pit64b_clkevt_resume()
210 * PIT64B timer may be fed by gclk or pclk. When gclk is used its rate has to
211 * be at least 3 times lower that pclk's rate. pclk rate is fixed, gclk rate
212 * could be changed via clock APIs. The chosen clock (pclk or gclk) could be
215 * This function, first tries to use GCLK by requesting the desired rate from
217 * requested rate. If PCLK/GCLK < 3 (condition requested by PIT64B hardware)
227 * | |-->gclk -->|-->| | +---------+ +-----+ |
236 * - gclk rate <= pclk rate/3
237 * - gclk rate could be requested from PMC
253 /* Try using GCLK. */ in mchp_pit64b_init_mode()
254 gclk_round = clk_round_rate(timer->gclk, max_rate); in mchp_pit64b_init_mode()
267 clk_set_rate(timer->gclk, gclk_round); in mchp_pit64b_init_mode()
280 /* Use GCLK. */ in mchp_pit64b_init_mode()
282 clk_set_rate(timer->gclk, gclk_round); in mchp_pit64b_init_mode()
289 timer->mode & MCHP_PIT64B_MR_SGCLK ? "gclk" : "pclk", best_pres, in mchp_pit64b_init_mode()
336 ce->timer.gclk = timer->gclk; in mchp_pit64b_init_clkevt()
376 timer.gclk = of_clk_get_by_name(node, "gclk"); in mchp_pit64b_dt_init_timer()
377 if (IS_ERR(timer.gclk)) in mchp_pit64b_dt_init_timer()
378 return PTR_ERR(timer.gclk); in mchp_pit64b_dt_init_timer()
402 ret = clk_prepare_enable(timer.gclk); in mchp_pit64b_dt_init_timer()
406 clk_rate = clk_get_rate(timer.gclk); in mchp_pit64b_dt_init_timer()
424 clk_disable_unprepare(timer.gclk); in mchp_pit64b_dt_init_timer()