Linux-2.6.12-rc2
[deliverable/linux.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
24 static struct time_interpolator sn2_interpolator = {
25 .drift = -1,
26 .shift = 10,
27 .mask = (1LL << 55) - 1,
28 .source = TIME_SOURCE_MMIO64
29 };
30
31 void __init sn_timer_init(void)
32 {
33 sn2_interpolator.frequency = sn_rtc_cycles_per_second;
34 sn2_interpolator.addr = RTC_COUNTER_ADDR;
35 register_time_interpolator(&sn2_interpolator);
36 }
This page took 0.031358 seconds and 5 git commands to generate.