Lines Matching refs:ttcce

385 	struct ttc_timer_clockevent *ttcce = container_of(ttc,  in ttc_rate_change_clockevent_cb()  local
393 clockevents_update_freq(&ttcce->ce, ndata->new_rate / PRESCALE); in ttc_rate_change_clockevent_cb()
406 struct ttc_timer_clockevent *ttcce; in ttc_setup_clockevent() local
409 ttcce = kzalloc(sizeof(*ttcce), GFP_KERNEL); in ttc_setup_clockevent()
410 if (!ttcce) in ttc_setup_clockevent()
413 ttcce->ttc.clk = clk; in ttc_setup_clockevent()
415 err = clk_prepare_enable(ttcce->ttc.clk); in ttc_setup_clockevent()
419 ttcce->ttc.clk_rate_change_nb.notifier_call = in ttc_setup_clockevent()
421 ttcce->ttc.clk_rate_change_nb.next = NULL; in ttc_setup_clockevent()
423 err = clk_notifier_register(ttcce->ttc.clk, in ttc_setup_clockevent()
424 &ttcce->ttc.clk_rate_change_nb); in ttc_setup_clockevent()
430 ttcce->ttc.freq = clk_get_rate(ttcce->ttc.clk); in ttc_setup_clockevent()
432 ttcce->ttc.base_addr = base; in ttc_setup_clockevent()
433 ttcce->ce.name = "ttc_clockevent"; in ttc_setup_clockevent()
434 ttcce->ce.features = CLOCK_EVT_FEAT_PERIODIC | CLOCK_EVT_FEAT_ONESHOT; in ttc_setup_clockevent()
435 ttcce->ce.set_next_event = ttc_set_next_event; in ttc_setup_clockevent()
436 ttcce->ce.set_state_shutdown = ttc_shutdown; in ttc_setup_clockevent()
437 ttcce->ce.set_state_periodic = ttc_set_periodic; in ttc_setup_clockevent()
438 ttcce->ce.set_state_oneshot = ttc_shutdown; in ttc_setup_clockevent()
439 ttcce->ce.tick_resume = ttc_resume; in ttc_setup_clockevent()
440 ttcce->ce.rating = 200; in ttc_setup_clockevent()
441 ttcce->ce.irq = irq; in ttc_setup_clockevent()
442 ttcce->ce.cpumask = cpu_possible_mask; in ttc_setup_clockevent()
449 writel_relaxed(0x23, ttcce->ttc.base_addr + TTC_CNT_CNTRL_OFFSET); in ttc_setup_clockevent()
451 ttcce->ttc.base_addr + TTC_CLK_CNTRL_OFFSET); in ttc_setup_clockevent()
452 writel_relaxed(0x1, ttcce->ttc.base_addr + TTC_IER_OFFSET); in ttc_setup_clockevent()
455 IRQF_TIMER, ttcce->ce.name, ttcce); in ttc_setup_clockevent()
459 clockevents_config_and_register(&ttcce->ce, in ttc_setup_clockevent()
460 ttcce->ttc.freq / PRESCALE, 1, 0xfffe); in ttc_setup_clockevent()
465 kfree(ttcce); in ttc_setup_clockevent()