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

/linux-4.4.14/drivers/clocksource/
H A Dcadence_ttc_timer.c386 struct ttc_timer_clockevent *ttcce = container_of(ttc, ttc_rate_change_clockevent_cb() local
394 clockevents_update_freq(&ttcce->ce, ndata->new_rate / PRESCALE); ttc_rate_change_clockevent_cb()
407 struct ttc_timer_clockevent *ttcce; ttc_setup_clockevent() local
410 ttcce = kzalloc(sizeof(*ttcce), GFP_KERNEL); ttc_setup_clockevent()
411 if (WARN_ON(!ttcce)) ttc_setup_clockevent()
414 ttcce->ttc.clk = clk; ttc_setup_clockevent()
416 err = clk_prepare_enable(ttcce->ttc.clk); ttc_setup_clockevent()
418 kfree(ttcce); ttc_setup_clockevent()
422 ttcce->ttc.clk_rate_change_nb.notifier_call = ttc_setup_clockevent()
424 ttcce->ttc.clk_rate_change_nb.next = NULL; ttc_setup_clockevent()
425 if (clk_notifier_register(ttcce->ttc.clk, ttc_setup_clockevent()
426 &ttcce->ttc.clk_rate_change_nb)) ttc_setup_clockevent()
428 ttcce->ttc.freq = clk_get_rate(ttcce->ttc.clk); ttc_setup_clockevent()
430 ttcce->ttc.base_addr = base; ttc_setup_clockevent()
431 ttcce->ce.name = "ttc_clockevent"; ttc_setup_clockevent()
432 ttcce->ce.features = CLOCK_EVT_FEAT_PERIODIC | CLOCK_EVT_FEAT_ONESHOT; ttc_setup_clockevent()
433 ttcce->ce.set_next_event = ttc_set_next_event; ttc_setup_clockevent()
434 ttcce->ce.set_state_shutdown = ttc_shutdown; ttc_setup_clockevent()
435 ttcce->ce.set_state_periodic = ttc_set_periodic; ttc_setup_clockevent()
436 ttcce->ce.set_state_oneshot = ttc_shutdown; ttc_setup_clockevent()
437 ttcce->ce.tick_resume = ttc_resume; ttc_setup_clockevent()
438 ttcce->ce.rating = 200; ttc_setup_clockevent()
439 ttcce->ce.irq = irq; ttc_setup_clockevent()
440 ttcce->ce.cpumask = cpu_possible_mask; ttc_setup_clockevent()
447 writel_relaxed(0x23, ttcce->ttc.base_addr + TTC_CNT_CNTRL_OFFSET); ttc_setup_clockevent()
449 ttcce->ttc.base_addr + TTC_CLK_CNTRL_OFFSET); ttc_setup_clockevent()
450 writel_relaxed(0x1, ttcce->ttc.base_addr + TTC_IER_OFFSET); ttc_setup_clockevent()
453 IRQF_TIMER, ttcce->ce.name, ttcce); ttc_setup_clockevent()
455 kfree(ttcce); ttc_setup_clockevent()
459 clockevents_config_and_register(&ttcce->ce, ttc_setup_clockevent()
460 ttcce->ttc.freq / PRESCALE, 1, 0xfffe); ttc_setup_clockevent()

Completed in 334 milliseconds