Skip to content

Commit 87b2335

Browse files
committed
[MIPS] IP27: Add clocksource drivers
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
1 parent 584d98b commit 87b2335

1 file changed

Lines changed: 11 additions & 3 deletions

File tree

‎arch/mips/sgi-ip27/ip27-timer.c‎

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -200,15 +200,23 @@ void __init plat_timer_setup(struct irqaction *irq)
200200
setup_irq(irqno, &rt_irqaction);
201201
}
202202

203-
static cycle_t ip27_hpt_read(void)
203+
static cycle_t hub_rt_read(void)
204204
{
205205
return REMOTE_HUB_L(cputonasid(0), PI_RT_COUNT);
206206
}
207207

208+
struct clocksource ht_rt_clocksource = {
209+
.name = "HUB",
210+
.rating = 200,
211+
.read = hub_rt_read,
212+
.mask = CLOCKSOURCE_MASK(52),
213+
.shift = 32,
214+
.flags = CLOCK_SOURCE_IS_CONTINUOUS,
215+
};
216+
208217
void __init plat_time_init(void)
209218
{
210-
clocksource_mips.read = ip27_hpt_read;
211-
mips_hpt_frequency = CYCLES_PER_SEC;
219+
clocksource_register(&ht_rt_clocksource);
212220
}
213221

214222
void __init cpu_time_init(void)

0 commit comments

Comments
 (0)