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

/linux-4.1.27/drivers/clocksource/
H A Dcadence_ttc_timer.c385 struct ttc_timer_clockevent *ttcce = container_of(ttc, ttc_rate_change_clockevent_cb() local
393 clockevents_update_freq(&ttcce->ce, ndata->new_rate / PRESCALE); ttc_rate_change_clockevent_cb()
406 struct ttc_timer_clockevent *ttcce; ttc_setup_clockevent() local
409 ttcce = kzalloc(sizeof(*ttcce), GFP_KERNEL); ttc_setup_clockevent()
410 if (WARN_ON(!ttcce)) ttc_setup_clockevent()
413 ttcce->ttc.clk = clk; ttc_setup_clockevent()
415 err = clk_prepare_enable(ttcce->ttc.clk); ttc_setup_clockevent()
417 kfree(ttcce); ttc_setup_clockevent()
421 ttcce->ttc.clk_rate_change_nb.notifier_call = ttc_setup_clockevent()
423 ttcce->ttc.clk_rate_change_nb.next = NULL; ttc_setup_clockevent()
424 if (clk_notifier_register(ttcce->ttc.clk, ttc_setup_clockevent()
425 &ttcce->ttc.clk_rate_change_nb)) ttc_setup_clockevent()
427 ttcce->ttc.freq = clk_get_rate(ttcce->ttc.clk); ttc_setup_clockevent()
429 ttcce->ttc.base_addr = base; ttc_setup_clockevent()
430 ttcce->ce.name = "ttc_clockevent"; ttc_setup_clockevent()
431 ttcce->ce.features = CLOCK_EVT_FEAT_PERIODIC | CLOCK_EVT_FEAT_ONESHOT; ttc_setup_clockevent()
432 ttcce->ce.set_next_event = ttc_set_next_event; ttc_setup_clockevent()
433 ttcce->ce.set_mode = ttc_set_mode; ttc_setup_clockevent()
434 ttcce->ce.rating = 200; ttc_setup_clockevent()
435 ttcce->ce.irq = irq; ttc_setup_clockevent()
436 ttcce->ce.cpumask = cpu_possible_mask; ttc_setup_clockevent()
443 writel_relaxed(0x23, ttcce->ttc.base_addr + TTC_CNT_CNTRL_OFFSET); ttc_setup_clockevent()
445 ttcce->ttc.base_addr + TTC_CLK_CNTRL_OFFSET); ttc_setup_clockevent()
446 writel_relaxed(0x1, ttcce->ttc.base_addr + TTC_IER_OFFSET); ttc_setup_clockevent()
449 IRQF_TIMER, ttcce->ce.name, ttcce); ttc_setup_clockevent()
451 kfree(ttcce); ttc_setup_clockevent()
455 clockevents_config_and_register(&ttcce->ce, ttc_setup_clockevent()
456 ttcce->ttc.freq / PRESCALE, 1, 0xfffe); ttc_setup_clockevent()

Completed in 80 milliseconds