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

/linux-4.4.14/drivers/clocksource/
H A Dcadence_ttc_timer.c236 struct ttc_timer_clocksource *ttccs = container_of(ttc, ttc_rate_change_clocksource_cb() local
269 ttccs->scale_clk_ctrl_reg_old = ttc_rate_change_clocksource_cb()
270 readl_relaxed(ttccs->ttc.base_addr + ttc_rate_change_clocksource_cb()
273 psv = (ttccs->scale_clk_ctrl_reg_old & ttc_rate_change_clocksource_cb()
285 ttccs->scale_clk_ctrl_reg_new = ttccs->scale_clk_ctrl_reg_old & ttc_rate_change_clocksource_cb()
287 ttccs->scale_clk_ctrl_reg_new |= psv << TTC_CLK_CNTRL_PSV_SHIFT; ttc_rate_change_clocksource_cb()
295 writel_relaxed(ttccs->scale_clk_ctrl_reg_new, ttc_rate_change_clocksource_cb()
296 ttccs->ttc.base_addr + TTC_CLK_CNTRL_OFFSET); ttc_rate_change_clocksource_cb()
305 writel_relaxed(ttccs->scale_clk_ctrl_reg_new, ttc_rate_change_clocksource_cb()
306 ttccs->ttc.base_addr + TTC_CLK_CNTRL_OFFSET); ttc_rate_change_clocksource_cb()
315 writel_relaxed(ttccs->scale_clk_ctrl_reg_old, ttc_rate_change_clocksource_cb()
316 ttccs->ttc.base_addr + TTC_CLK_CNTRL_OFFSET); ttc_rate_change_clocksource_cb()
328 struct ttc_timer_clocksource *ttccs; ttc_setup_clocksource() local
331 ttccs = kzalloc(sizeof(*ttccs), GFP_KERNEL); ttc_setup_clocksource()
332 if (WARN_ON(!ttccs)) ttc_setup_clocksource()
335 ttccs->ttc.clk = clk; ttc_setup_clocksource()
337 err = clk_prepare_enable(ttccs->ttc.clk); ttc_setup_clocksource()
339 kfree(ttccs); ttc_setup_clocksource()
343 ttccs->ttc.freq = clk_get_rate(ttccs->ttc.clk); ttc_setup_clocksource()
345 ttccs->ttc.clk_rate_change_nb.notifier_call = ttc_setup_clocksource()
347 ttccs->ttc.clk_rate_change_nb.next = NULL; ttc_setup_clocksource()
348 if (clk_notifier_register(ttccs->ttc.clk, ttc_setup_clocksource()
349 &ttccs->ttc.clk_rate_change_nb)) ttc_setup_clocksource()
352 ttccs->ttc.base_addr = base; ttc_setup_clocksource()
353 ttccs->cs.name = "ttc_clocksource"; ttc_setup_clocksource()
354 ttccs->cs.rating = 200; ttc_setup_clocksource()
355 ttccs->cs.read = __ttc_clocksource_read; ttc_setup_clocksource()
356 ttccs->cs.mask = CLOCKSOURCE_MASK(timer_width); ttc_setup_clocksource()
357 ttccs->cs.flags = CLOCK_SOURCE_IS_CONTINUOUS; ttc_setup_clocksource()
364 writel_relaxed(0x0, ttccs->ttc.base_addr + TTC_IER_OFFSET); ttc_setup_clocksource()
366 ttccs->ttc.base_addr + TTC_CLK_CNTRL_OFFSET); ttc_setup_clocksource()
368 ttccs->ttc.base_addr + TTC_CNT_CNTRL_OFFSET); ttc_setup_clocksource()
370 err = clocksource_register_hz(&ttccs->cs, ttccs->ttc.freq / PRESCALE); ttc_setup_clocksource()
372 kfree(ttccs); ttc_setup_clocksource()
378 ttccs->ttc.freq / PRESCALE); ttc_setup_clocksource()

Completed in 29 milliseconds