Lines Matching full:tmr
84 struct ixp4xx_timer *tmr = dev_id; in ixp4xx_timer_interrupt() local
85 struct clock_event_device *evt = &tmr->clkevt; in ixp4xx_timer_interrupt()
89 tmr->base + IXP4XX_OSST_OFFSET); in ixp4xx_timer_interrupt()
99 struct ixp4xx_timer *tmr = to_ixp4xx_timer(evt); in ixp4xx_set_next_event() local
102 val = __raw_readl(tmr->base + IXP4XX_OSRT1_OFFSET); in ixp4xx_set_next_event()
106 tmr->base + IXP4XX_OSRT1_OFFSET); in ixp4xx_set_next_event()
113 struct ixp4xx_timer *tmr = to_ixp4xx_timer(evt); in ixp4xx_shutdown() local
116 val = __raw_readl(tmr->base + IXP4XX_OSRT1_OFFSET); in ixp4xx_shutdown()
118 __raw_writel(val, tmr->base + IXP4XX_OSRT1_OFFSET); in ixp4xx_shutdown()
125 struct ixp4xx_timer *tmr = to_ixp4xx_timer(evt); in ixp4xx_set_oneshot() local
128 tmr->base + IXP4XX_OSRT1_OFFSET); in ixp4xx_set_oneshot()
135 struct ixp4xx_timer *tmr = to_ixp4xx_timer(evt); in ixp4xx_set_periodic() local
138 val = tmr->latch & ~IXP4XX_OST_RELOAD_MASK; in ixp4xx_set_periodic()
140 __raw_writel(val, tmr->base + IXP4XX_OSRT1_OFFSET); in ixp4xx_set_periodic()
147 struct ixp4xx_timer *tmr = to_ixp4xx_timer(evt); in ixp4xx_resume() local
150 val = __raw_readl(tmr->base + IXP4XX_OSRT1_OFFSET); in ixp4xx_resume()
152 __raw_writel(val, tmr->base + IXP4XX_OSRT1_OFFSET); in ixp4xx_resume()
166 struct ixp4xx_timer *tmr; in ixp4xx_timer_register() local
169 tmr = kzalloc(sizeof(*tmr), GFP_KERNEL); in ixp4xx_timer_register()
170 if (!tmr) in ixp4xx_timer_register()
172 tmr->base = base; in ixp4xx_timer_register()
180 tmr->latch = DIV_ROUND_CLOSEST(timer_freq, in ixp4xx_timer_register()
184 local_ixp4xx_timer = tmr; in ixp4xx_timer_register()
187 __raw_writel(0, tmr->base + IXP4XX_OSRT1_OFFSET); in ixp4xx_timer_register()
191 tmr->base + IXP4XX_OSST_OFFSET); in ixp4xx_timer_register()
194 __raw_writel(0, tmr->base + IXP4XX_OSTS_OFFSET); in ixp4xx_timer_register()
199 tmr->clkevt.name = "ixp4xx timer1"; in ixp4xx_timer_register()
200 tmr->clkevt.features = CLOCK_EVT_FEAT_PERIODIC | CLOCK_EVT_FEAT_ONESHOT; in ixp4xx_timer_register()
201 tmr->clkevt.rating = 200; in ixp4xx_timer_register()
202 tmr->clkevt.set_state_shutdown = ixp4xx_shutdown; in ixp4xx_timer_register()
203 tmr->clkevt.set_state_periodic = ixp4xx_set_periodic; in ixp4xx_timer_register()
204 tmr->clkevt.set_state_oneshot = ixp4xx_set_oneshot; in ixp4xx_timer_register()
205 tmr->clkevt.tick_resume = ixp4xx_resume; in ixp4xx_timer_register()
206 tmr->clkevt.set_next_event = ixp4xx_set_next_event; in ixp4xx_timer_register()
207 tmr->clkevt.cpumask = cpumask_of(0); in ixp4xx_timer_register()
208 tmr->clkevt.irq = timer_irq; in ixp4xx_timer_register()
210 IRQF_TIMER, "IXP4XX-TIMER1", tmr); in ixp4xx_timer_register()
215 clockevents_config_and_register(&tmr->clkevt, timer_freq, in ixp4xx_timer_register()
222 tmr->delay_timer.read_current_timer = ixp4xx_read_timer; in ixp4xx_timer_register()
223 tmr->delay_timer.freq = timer_freq; in ixp4xx_timer_register()
224 register_current_timer_delay(&tmr->delay_timer); in ixp4xx_timer_register()