Lines Matching refs:ced

50 	struct clock_event_device ced;  member
242 if (clockevent_state_oneshot(&ch->ced)) in sh_tmu_interrupt()
248 ch->ced.event_handler(&ch->ced); in sh_tmu_interrupt()
338 static struct sh_tmu_channel *ced_to_sh_tmu(struct clock_event_device *ced) in ced_to_sh_tmu() argument
340 return container_of(ced, struct sh_tmu_channel, ced); in ced_to_sh_tmu()
353 static int sh_tmu_clock_event_shutdown(struct clock_event_device *ced) in sh_tmu_clock_event_shutdown() argument
355 struct sh_tmu_channel *ch = ced_to_sh_tmu(ced); in sh_tmu_clock_event_shutdown()
357 if (clockevent_state_oneshot(ced) || clockevent_state_periodic(ced)) in sh_tmu_clock_event_shutdown()
362 static int sh_tmu_clock_event_set_state(struct clock_event_device *ced, in sh_tmu_clock_event_set_state() argument
365 struct sh_tmu_channel *ch = ced_to_sh_tmu(ced); in sh_tmu_clock_event_set_state()
368 if (clockevent_state_oneshot(ced) || clockevent_state_periodic(ced)) in sh_tmu_clock_event_set_state()
377 static int sh_tmu_clock_event_set_oneshot(struct clock_event_device *ced) in sh_tmu_clock_event_set_oneshot() argument
379 return sh_tmu_clock_event_set_state(ced, 0); in sh_tmu_clock_event_set_oneshot()
382 static int sh_tmu_clock_event_set_periodic(struct clock_event_device *ced) in sh_tmu_clock_event_set_periodic() argument
384 return sh_tmu_clock_event_set_state(ced, 1); in sh_tmu_clock_event_set_periodic()
388 struct clock_event_device *ced) in sh_tmu_clock_event_next() argument
390 struct sh_tmu_channel *ch = ced_to_sh_tmu(ced); in sh_tmu_clock_event_next()
392 BUG_ON(!clockevent_state_oneshot(ced)); in sh_tmu_clock_event_next()
399 static void sh_tmu_clock_event_suspend(struct clock_event_device *ced) in sh_tmu_clock_event_suspend() argument
401 pm_genpd_syscore_poweroff(&ced_to_sh_tmu(ced)->tmu->pdev->dev); in sh_tmu_clock_event_suspend()
404 static void sh_tmu_clock_event_resume(struct clock_event_device *ced) in sh_tmu_clock_event_resume() argument
406 pm_genpd_syscore_poweron(&ced_to_sh_tmu(ced)->tmu->pdev->dev); in sh_tmu_clock_event_resume()
412 struct clock_event_device *ced = &ch->ced; in sh_tmu_register_clockevent() local
415 ced->name = name; in sh_tmu_register_clockevent()
416 ced->features = CLOCK_EVT_FEAT_PERIODIC; in sh_tmu_register_clockevent()
417 ced->features |= CLOCK_EVT_FEAT_ONESHOT; in sh_tmu_register_clockevent()
418 ced->rating = 200; in sh_tmu_register_clockevent()
419 ced->cpumask = cpu_possible_mask; in sh_tmu_register_clockevent()
420 ced->set_next_event = sh_tmu_clock_event_next; in sh_tmu_register_clockevent()
421 ced->set_state_shutdown = sh_tmu_clock_event_shutdown; in sh_tmu_register_clockevent()
422 ced->set_state_periodic = sh_tmu_clock_event_set_periodic; in sh_tmu_register_clockevent()
423 ced->set_state_oneshot = sh_tmu_clock_event_set_oneshot; in sh_tmu_register_clockevent()
424 ced->suspend = sh_tmu_clock_event_suspend; in sh_tmu_register_clockevent()
425 ced->resume = sh_tmu_clock_event_resume; in sh_tmu_register_clockevent()
430 clockevents_config_and_register(ced, ch->tmu->rate, 0x300, 0xffffffff); in sh_tmu_register_clockevent()