Lines Matching full:ttc
87 struct ttc_timer ttc; member
95 struct ttc_timer ttc; member
142 struct ttc_timer *timer = &ttce->ttc; in ttc_clock_event_interrupt()
160 struct ttc_timer *timer = &to_ttc_timer_clksrc(cs)->ttc; in __ttc_clocksource_read()
183 struct ttc_timer *timer = &ttce->ttc; in ttc_set_next_event()
200 struct ttc_timer *timer = &ttce->ttc; in ttc_shutdown()
218 struct ttc_timer *timer = &ttce->ttc; in ttc_set_periodic()
221 DIV_ROUND_CLOSEST(ttce->ttc.freq, PRESCALE * HZ)); in ttc_set_periodic()
228 struct ttc_timer *timer = &ttce->ttc; in ttc_resume()
241 struct ttc_timer *ttc = to_ttc_timer(nb); in ttc_rate_change_clocksource_cb() local
242 struct ttc_timer_clocksource *ttccs = container_of(ttc, in ttc_rate_change_clocksource_cb()
243 struct ttc_timer_clocksource, ttc); in ttc_rate_change_clocksource_cb()
276 readl_relaxed(ttccs->ttc.base_addr + in ttc_rate_change_clocksource_cb()
302 ttccs->ttc.base_addr + TTC_CLK_CNTRL_OFFSET); in ttc_rate_change_clocksource_cb()
312 ttccs->ttc.base_addr + TTC_CLK_CNTRL_OFFSET); in ttc_rate_change_clocksource_cb()
322 ttccs->ttc.base_addr + TTC_CLK_CNTRL_OFFSET); in ttc_rate_change_clocksource_cb()
341 ttccs->ttc.clk = clk; in ttc_setup_clocksource()
343 err = clk_prepare_enable(ttccs->ttc.clk); in ttc_setup_clocksource()
349 ttccs->ttc.freq = clk_get_rate(ttccs->ttc.clk); in ttc_setup_clocksource()
351 ttccs->ttc.clk_rate_change_nb.notifier_call = in ttc_setup_clocksource()
353 ttccs->ttc.clk_rate_change_nb.next = NULL; in ttc_setup_clocksource()
355 err = clk_notifier_register(ttccs->ttc.clk, in ttc_setup_clocksource()
356 &ttccs->ttc.clk_rate_change_nb); in ttc_setup_clocksource()
360 ttccs->ttc.base_addr = base; in ttc_setup_clocksource()
372 writel_relaxed(0x0, ttccs->ttc.base_addr + TTC_IER_OFFSET); in ttc_setup_clocksource()
374 ttccs->ttc.base_addr + TTC_CLK_CNTRL_OFFSET); in ttc_setup_clocksource()
376 ttccs->ttc.base_addr + TTC_CNT_CNTRL_OFFSET); in ttc_setup_clocksource()
378 err = clocksource_register_hz(&ttccs->cs, ttccs->ttc.freq / PRESCALE); in ttc_setup_clocksource()
386 ttccs->ttc.freq / PRESCALE); in ttc_setup_clocksource()
395 struct ttc_timer *ttc = to_ttc_timer(nb); in ttc_rate_change_clockevent_cb() local
396 struct ttc_timer_clockevent *ttcce = container_of(ttc, in ttc_rate_change_clockevent_cb()
397 struct ttc_timer_clockevent, ttc); in ttc_rate_change_clockevent_cb()
402 ttc->freq = ndata->new_rate; in ttc_rate_change_clockevent_cb()
424 ttcce->ttc.clk = clk; in ttc_setup_clockevent()
426 err = clk_prepare_enable(ttcce->ttc.clk); in ttc_setup_clockevent()
430 ttcce->ttc.clk_rate_change_nb.notifier_call = in ttc_setup_clockevent()
432 ttcce->ttc.clk_rate_change_nb.next = NULL; in ttc_setup_clockevent()
434 err = clk_notifier_register(ttcce->ttc.clk, in ttc_setup_clockevent()
435 &ttcce->ttc.clk_rate_change_nb); in ttc_setup_clockevent()
441 ttcce->ttc.freq = clk_get_rate(ttcce->ttc.clk); in ttc_setup_clockevent()
443 ttcce->ttc.base_addr = base; in ttc_setup_clockevent()
460 writel_relaxed(0x23, ttcce->ttc.base_addr + TTC_CNT_CNTRL_OFFSET); in ttc_setup_clockevent()
462 ttcce->ttc.base_addr + TTC_CLK_CNTRL_OFFSET); in ttc_setup_clockevent()
463 writel_relaxed(0x1, ttcce->ttc.base_addr + TTC_IER_OFFSET); in ttc_setup_clockevent()
471 ttcce->ttc.freq / PRESCALE, 1, 0xfffe); in ttc_setup_clockevent()
476 clk_disable_unprepare(ttcce->ttc.clk); in ttc_setup_clockevent()
498 * Get the 1st Triple Timer Counter (TTC) block from the device tree in ttc_timer_probe()
500 * 2nd TTC hence the irq_of_parse_and_map(,1) in ttc_timer_probe()
553 {.compatible = "cdns,ttc"},