Lines Matching refs:to

52 	struct timer_of *to = to_timer_of(clk);
55 val = readl_relaxed(timer_of_base(to) + MLB_TMR_EVT_TMCSR_OFS);
57 writel_relaxed(val, timer_of_base(to) + MLB_TMR_EVT_TMCSR_OFS);
64 static void mlb_evt_timer_start(struct timer_of *to, bool periodic)
71 writel_relaxed(val, timer_of_base(to) + MLB_TMR_EVT_TMCSR_OFS);
74 static void mlb_evt_timer_stop(struct timer_of *to)
76 u32 val = readl_relaxed(timer_of_base(to) + MLB_TMR_EVT_TMCSR_OFS);
79 writel_relaxed(val, timer_of_base(to) + MLB_TMR_EVT_TMCSR_OFS);
82 static void mlb_evt_timer_register_count(struct timer_of *to, unsigned long cnt)
84 writel_relaxed(cnt, timer_of_base(to) + MLB_TMR_EVT_TMRLR1_OFS);
89 struct timer_of *to = to_timer_of(clk);
91 mlb_evt_timer_stop(to);
92 mlb_evt_timer_register_count(to, to->of_clk.period);
93 mlb_evt_timer_start(to, MLB_TIMER_PERIODIC);
99 struct timer_of *to = to_timer_of(clk);
101 mlb_evt_timer_stop(to);
102 mlb_evt_timer_start(to, MLB_TIMER_ONESHOT);
108 struct timer_of *to = to_timer_of(clk);
110 mlb_evt_timer_stop(to);
117 struct timer_of *to = to_timer_of(clk);
119 mlb_evt_timer_stop(to);
120 mlb_evt_timer_register_count(to, event);
121 mlb_evt_timer_start(to, MLB_TIMER_ONESHOT);
125 static int mlb_config_clock_source(struct timer_of *to)
129 writel_relaxed(val, timer_of_base(to) + MLB_TMR_SRC_TMCSR_OFS);
130 writel_relaxed(~0, timer_of_base(to) + MLB_TMR_SRC_TMRLR1_OFS);
131 writel_relaxed(~0, timer_of_base(to) + MLB_TMR_SRC_TMRLR2_OFS);
133 writel_relaxed(val, timer_of_base(to) + MLB_TMR_SRC_TMCSR_OFS);
137 static int mlb_config_clock_event(struct timer_of *to)
139 writel_relaxed(0, timer_of_base(to) + MLB_TMR_EVT_TMCSR_OFS);
143 static struct timer_of to = {
165 return ~readl_relaxed(timer_of_base(&to) + MLB_TMR_SRC_TMR_OFS);
173 ret = timer_of_init(node, &to);
177 rate = timer_of_rate(&to) / MLB_TMR_DIV_CNT;
178 mlb_config_clock_source(&to);
179 clocksource_mmio_init(timer_of_base(&to) + MLB_TMR_SRC_TMR_OFS,
183 mlb_config_clock_event(&to);
184 clockevents_config_and_register(&to.clkevt, timer_of_rate(&to), 15,