diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2007-10-11 18:46:10 -0400 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2007-10-11 18:46:10 -0400 |
commit | 87b2335d6ef97e19ca19dbbb523673680a029e3f (patch) | |
tree | b361604512cc05a0657ac50d8d9e017b41b224ed | |
parent | 584d98be3b90f00b410288e59eeba871fbf81b86 (diff) |
[MIPS] IP27: Add clocksource drivers
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
-rw-r--r-- | arch/mips/sgi-ip27/ip27-timer.c | 14 |
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 | ||
203 | static cycle_t ip27_hpt_read(void) | 203 | static 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 | ||
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 | |||
208 | void __init plat_time_init(void) | 217 | void __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 | ||
214 | void __init cpu_time_init(void) | 222 | void __init cpu_time_init(void) |