Commit 87b2335d authored by Ralf Baechle's avatar Ralf Baechle

[MIPS] IP27: Add clocksource drivers

Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
parent 584d98be
...@@ -200,15 +200,23 @@ void __init plat_timer_setup(struct irqaction *irq) ...@@ -200,15 +200,23 @@ void __init plat_timer_setup(struct irqaction *irq)
setup_irq(irqno, &rt_irqaction); setup_irq(irqno, &rt_irqaction);
} }
static cycle_t ip27_hpt_read(void) static cycle_t hub_rt_read(void)
{ {
return REMOTE_HUB_L(cputonasid(0), PI_RT_COUNT); return REMOTE_HUB_L(cputonasid(0), PI_RT_COUNT);
} }
struct clocksource ht_rt_clocksource = {
.name = "HUB",
.rating = 200,
.read = hub_rt_read,
.mask = CLOCKSOURCE_MASK(52),
.shift = 32,
.flags = CLOCK_SOURCE_IS_CONTINUOUS,
};
void __init plat_time_init(void) void __init plat_time_init(void)
{ {
clocksource_mips.read = ip27_hpt_read; clocksource_register(&ht_rt_clocksource);
mips_hpt_frequency = CYCLES_PER_SEC;
} }
void __init cpu_time_init(void) void __init cpu_time_init(void)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment