Lines Matching refs:of_clk
94 static __init void timer_of_clk_exit(struct of_timer_clk *of_clk) in timer_of_clk_exit() argument
96 of_clk->rate = 0; in timer_of_clk_exit()
97 clk_disable_unprepare(of_clk->clk); in timer_of_clk_exit()
98 clk_put(of_clk->clk); in timer_of_clk_exit()
111 struct of_timer_clk *of_clk) in timer_of_clk_init() argument
115 of_clk->clk = of_clk->name ? of_clk_get_by_name(np, of_clk->name) : in timer_of_clk_init()
116 of_clk_get(np, of_clk->index); in timer_of_clk_init()
117 if (IS_ERR(of_clk->clk)) { in timer_of_clk_init()
118 ret = PTR_ERR(of_clk->clk); in timer_of_clk_init()
124 ret = clk_prepare_enable(of_clk->clk); in timer_of_clk_init()
130 of_clk->rate = clk_get_rate(of_clk->clk); in timer_of_clk_init()
131 if (!of_clk->rate) { in timer_of_clk_init()
137 of_clk->period = DIV_ROUND_UP(of_clk->rate, HZ); in timer_of_clk_init()
142 clk_disable_unprepare(of_clk->clk); in timer_of_clk_init()
144 clk_put(of_clk->clk); in timer_of_clk_init()
181 ret = timer_of_clk_init(np, &to->of_clk); in timer_of_init()
206 timer_of_clk_exit(&to->of_clk); in timer_of_init()
226 timer_of_clk_exit(&to->of_clk); in timer_of_cleanup()