Searched refs:ttccs (Results 1 - 1 of 1) sorted by relevance

/linux-4.1.27/drivers/clocksource/
H A Dcadence_ttc_timer.c235 struct ttc_timer_clocksource *ttccs = container_of(ttc, ttc_rate_change_clocksource_cb() local
268 ttccs->scale_clk_ctrl_reg_old = ttc_rate_change_clocksource_cb()
269 readl_relaxed(ttccs->ttc.base_addr + ttc_rate_change_clocksource_cb()
272 psv = (ttccs->scale_clk_ctrl_reg_old & ttc_rate_change_clocksource_cb()
284 ttccs->scale_clk_ctrl_reg_new = ttccs->scale_clk_ctrl_reg_old & ttc_rate_change_clocksource_cb()
286 ttccs->scale_clk_ctrl_reg_new |= psv << TTC_CLK_CNTRL_PSV_SHIFT; ttc_rate_change_clocksource_cb()
294 writel_relaxed(ttccs->scale_clk_ctrl_reg_new, ttc_rate_change_clocksource_cb()
295 ttccs->ttc.base_addr + TTC_CLK_CNTRL_OFFSET); ttc_rate_change_clocksource_cb()
304 writel_relaxed(ttccs->scale_clk_ctrl_reg_new, ttc_rate_change_clocksource_cb()
305 ttccs->ttc.base_addr + TTC_CLK_CNTRL_OFFSET); ttc_rate_change_clocksource_cb()
314 writel_relaxed(ttccs->scale_clk_ctrl_reg_old, ttc_rate_change_clocksource_cb()
315 ttccs->ttc.base_addr + TTC_CLK_CNTRL_OFFSET); ttc_rate_change_clocksource_cb()
327 struct ttc_timer_clocksource *ttccs; ttc_setup_clocksource() local
330 ttccs = kzalloc(sizeof(*ttccs), GFP_KERNEL); ttc_setup_clocksource()
331 if (WARN_ON(!ttccs)) ttc_setup_clocksource()
334 ttccs->ttc.clk = clk; ttc_setup_clocksource()
336 err = clk_prepare_enable(ttccs->ttc.clk); ttc_setup_clocksource()
338 kfree(ttccs); ttc_setup_clocksource()
342 ttccs->ttc.freq = clk_get_rate(ttccs->ttc.clk); ttc_setup_clocksource()
344 ttccs->ttc.clk_rate_change_nb.notifier_call = ttc_setup_clocksource()
346 ttccs->ttc.clk_rate_change_nb.next = NULL; ttc_setup_clocksource()
347 if (clk_notifier_register(ttccs->ttc.clk, ttc_setup_clocksource()
348 &ttccs->ttc.clk_rate_change_nb)) ttc_setup_clocksource()
351 ttccs->ttc.base_addr = base; ttc_setup_clocksource()
352 ttccs->cs.name = "ttc_clocksource"; ttc_setup_clocksource()
353 ttccs->cs.rating = 200; ttc_setup_clocksource()
354 ttccs->cs.read = __ttc_clocksource_read; ttc_setup_clocksource()
355 ttccs->cs.mask = CLOCKSOURCE_MASK(timer_width); ttc_setup_clocksource()
356 ttccs->cs.flags = CLOCK_SOURCE_IS_CONTINUOUS; ttc_setup_clocksource()
363 writel_relaxed(0x0, ttccs->ttc.base_addr + TTC_IER_OFFSET); ttc_setup_clocksource()
365 ttccs->ttc.base_addr + TTC_CLK_CNTRL_OFFSET); ttc_setup_clocksource()
367 ttccs->ttc.base_addr + TTC_CNT_CNTRL_OFFSET); ttc_setup_clocksource()
369 err = clocksource_register_hz(&ttccs->cs, ttccs->ttc.freq / PRESCALE); ttc_setup_clocksource()
371 kfree(ttccs); ttc_setup_clocksource()
377 ttccs->ttc.freq / PRESCALE); ttc_setup_clocksource()

Completed in 110 milliseconds