This commit was manufactured by cvs2svn to create tag 'before-xenU'.
[linux-2.6.git] / arch / ia64 / sn / kernel / sn2 / timer.c
1 /*
2  * linux/arch/ia64/sn/kernel/sn2/timer.c
3  *
4  * Copyright (C) 2003 Silicon Graphics, Inc.
5  * Copyright (C) 2003 Hewlett-Packard Co
6  *      David Mosberger <davidm@hpl.hp.com>: updated for new timer-interpolation infrastructure
7  */
8
9 #include <linux/init.h>
10 #include <linux/kernel.h>
11 #include <linux/sched.h>
12 #include <linux/time.h>
13 #include <linux/interrupt.h>
14
15 #include <asm/hw_irq.h>
16 #include <asm/system.h>
17
18 #include <asm/sn/leds.h>
19 #include <asm/sn/shub_mmr.h>
20 #include <asm/sn/clksupport.h>
21
22 extern unsigned long sn_rtc_cycles_per_second;
23 static struct time_interpolator sn2_interpolator = {
24         .drift = -1,
25         .shift = 10,
26         .mask = (1LL << 55) - 1,
27         .source = TIME_SOURCE_MMIO64
28 };
29
30 void __init sn_timer_init(void)
31 {
32         sn2_interpolator.frequency = sn_rtc_cycles_per_second;
33         sn2_interpolator.addr = RTC_COUNTER_ADDR;
34         register_time_interpolator(&sn2_interpolator);
35 }