aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/sgi-ip27
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2007-10-11 18:46:10 -0400
committerRalf Baechle <ralf@linux-mips.org>2007-10-11 18:46:10 -0400
commit87b2335d6ef97e19ca19dbbb523673680a029e3f (patch)
treeb361604512cc05a0657ac50d8d9e017b41b224ed /arch/mips/sgi-ip27
parent584d98be3b90f00b410288e59eeba871fbf81b86 (diff)
[MIPS] IP27: Add clocksource drivers
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/sgi-ip27')
-rw-r--r--arch/mips/sgi-ip27/ip27-timer.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/arch/mips/sgi-ip27/ip27-timer.c b/arch/mips/sgi-ip27/ip27-timer.c
index 9c1700e85be0..b7b3479b6bce 100644
--- a/arch/mips/sgi-ip27/ip27-timer.c
+++ b/arch/mips/sgi-ip27/ip27-timer.c
@@ -200,15 +200,23 @@ void __init plat_timer_setup(struct irqaction *irq)
200 setup_irq(irqno, &rt_irqaction); 200 setup_irq(irqno, &rt_irqaction);
201} 201}
202 202
203static cycle_t ip27_hpt_read(void) 203static cycle_t hub_rt_read(void)
204{ 204{
205 return REMOTE_HUB_L(cputonasid(0), PI_RT_COUNT); 205 return REMOTE_HUB_L(cputonasid(0), PI_RT_COUNT);
206} 206}
207 207
208struct 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
208void __init plat_time_init(void) 217void __init plat_time_init(void)
209{ 218{
210 clocksource_mips.read = ip27_hpt_read; 219 clocksource_register(&ht_rt_clocksource);
211 mips_hpt_frequency = CYCLES_PER_SEC;
212} 220}
213 221
214void __init cpu_time_init(void) 222void __init cpu_time_init(void)