Lines Matching refs:ced
108 struct clock_event_device ced; member
541 if (ch->ced.mode == CLOCK_EVT_MODE_ONESHOT) { in sh_cmt_interrupt()
546 ch->ced.event_handler(&ch->ced); in sh_cmt_interrupt()
557 if ((ch->ced.mode == CLOCK_EVT_MODE_SHUTDOWN) in sh_cmt_interrupt()
699 static struct sh_cmt_channel *ced_to_sh_cmt(struct clock_event_device *ced) in ced_to_sh_cmt() argument
701 return container_of(ced, struct sh_cmt_channel, ced); in ced_to_sh_cmt()
706 struct clock_event_device *ced = &ch->ced; in sh_cmt_clock_event_start() local
712 ced->shift = 32; in sh_cmt_clock_event_start()
713 ced->mult = div_sc(ch->rate, NSEC_PER_SEC, ced->shift); in sh_cmt_clock_event_start()
714 ced->max_delta_ns = clockevent_delta2ns(ch->max_match_value, ced); in sh_cmt_clock_event_start()
715 ced->min_delta_ns = clockevent_delta2ns(0x1f, ced); in sh_cmt_clock_event_start()
724 struct clock_event_device *ced) in sh_cmt_clock_event_mode() argument
726 struct sh_cmt_channel *ch = ced_to_sh_cmt(ced); in sh_cmt_clock_event_mode()
729 switch (ced->mode) { in sh_cmt_clock_event_mode()
759 struct clock_event_device *ced) in sh_cmt_clock_event_next() argument
761 struct sh_cmt_channel *ch = ced_to_sh_cmt(ced); in sh_cmt_clock_event_next()
763 BUG_ON(ced->mode != CLOCK_EVT_MODE_ONESHOT); in sh_cmt_clock_event_next()
772 static void sh_cmt_clock_event_suspend(struct clock_event_device *ced) in sh_cmt_clock_event_suspend() argument
774 struct sh_cmt_channel *ch = ced_to_sh_cmt(ced); in sh_cmt_clock_event_suspend()
780 static void sh_cmt_clock_event_resume(struct clock_event_device *ced) in sh_cmt_clock_event_resume() argument
782 struct sh_cmt_channel *ch = ced_to_sh_cmt(ced); in sh_cmt_clock_event_resume()
791 struct clock_event_device *ced = &ch->ced; in sh_cmt_register_clockevent() local
811 ced->name = name; in sh_cmt_register_clockevent()
812 ced->features = CLOCK_EVT_FEAT_PERIODIC; in sh_cmt_register_clockevent()
813 ced->features |= CLOCK_EVT_FEAT_ONESHOT; in sh_cmt_register_clockevent()
814 ced->rating = 125; in sh_cmt_register_clockevent()
815 ced->cpumask = cpu_possible_mask; in sh_cmt_register_clockevent()
816 ced->set_next_event = sh_cmt_clock_event_next; in sh_cmt_register_clockevent()
817 ced->set_mode = sh_cmt_clock_event_mode; in sh_cmt_register_clockevent()
818 ced->suspend = sh_cmt_clock_event_suspend; in sh_cmt_register_clockevent()
819 ced->resume = sh_cmt_clock_event_resume; in sh_cmt_register_clockevent()
823 clockevents_register_device(ced); in sh_cmt_register_clockevent()