Lines Matching +full:en751221 +full:- +full:timer
1 // SPDX-License-Identifier: GPL-2.0
3 * Timer present on EcoNet EN75xx MIPS based SoCs.
21 #define ECONET_MAX_DELTA GENMASK(ECONET_BITS - 2, 0)
68 int cpu = cpumask_first(dev->cpumask); in cevt_interrupt()
77 dev->event_handler(dev); in cevt_interrupt()
86 cpu = cpumask_first(dev->cpumask); in cevt_set_next_event()
90 if ((s32)(next - ioread32(reg_count(cpu))) < ECONET_MIN_DELTA / 2) in cevt_set_next_event()
91 return -ETIME; in cevt_set_next_event()
101 pr_debug("%s: Setting up clockevent for CPU %d\n", cd->name, cpu); in cevt_init_cpu()
106 enable_percpu_irq(cd->irq, IRQ_TYPE_NONE); in cevt_init_cpu()
108 /* Do this last because it synchronously configures the timer */ in cevt_init_cpu()
136 return -EINVAL; in cevt_init()
139 ret = request_percpu_irq(irq, cevt_interrupt, np->name, &econet_timer_pcpu); in cevt_init()
149 cd->rating = 310; in cevt_init()
150 cd->features = CLOCK_EVT_FEAT_ONESHOT | in cevt_init()
153 cd->set_next_event = cevt_set_next_event; in cevt_init()
154 cd->irq = irq; in cevt_init()
155 cd->cpumask = cpumask_of(i); in cevt_init()
156 cd->name = np->name; in cevt_init()
162 "clockevents/econet/timer:starting", in cevt_init()
189 return -ENXIO; in timer_init()
194 ret = clocksource_mmio_init(reg_count(0), np->name, in timer_init()
209 pr_info("%pOFn: using %u.%03u MHz high precision timer\n", np, in timer_init()
216 TIMER_OF_DECLARE(econet_timer_hpt, "econet,en751221-timer", timer_init);