2 * Intel & MS High Precision Event Timer Implementation.
4 * Copyright (C) 2003 Intel Corporation
6 * (c) Copyright 2004 Hewlett-Packard Development Company, L.P.
7 * Bob Picco <robert.picco@hp.com>
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License version 2 as
11 * published by the Free Software Foundation.
14 #include <linux/config.h>
15 #include <linux/interrupt.h>
16 #include <linux/module.h>
17 #include <linux/kernel.h>
18 #include <linux/types.h>
19 #include <linux/miscdevice.h>
20 #include <linux/major.h>
21 #include <linux/ioport.h>
22 #include <linux/fcntl.h>
23 #include <linux/init.h>
24 #include <linux/poll.h>
25 #include <linux/proc_fs.h>
26 #include <linux/spinlock.h>
27 #include <linux/sysctl.h>
28 #include <linux/wait.h>
29 #include <linux/bcd.h>
30 #include <linux/seq_file.h>
31 #include <linux/bitops.h>
33 #include <asm/current.h>
34 #include <asm/uaccess.h>
35 #include <asm/system.h>
38 #include <asm/div64.h>
40 #include <linux/acpi.h>
41 #include <acpi/acpi_bus.h>
42 #include <linux/hpet.h>
45 * The High Precision Event Timer driver.
46 * This driver is closely modelled after the rtc.c driver.
47 * http://www.intel.com/hardwaredesign/hpetspec.htm
49 #define HPET_USER_FREQ (64)
50 #define HPET_DRIFT (500)
52 static u32 hpet_nhpet, hpet_max_freq = HPET_USER_FREQ;
54 /* A lock for concurrent access by app and isr hpet activity. */
55 static DEFINE_SPINLOCK(hpet_lock);
56 /* A lock for concurrent intermodule access to hpet and isr hpet activity. */
57 static DEFINE_SPINLOCK(hpet_task_lock);
59 #define HPET_DEV_NAME (7)
62 struct hpets *hd_hpets;
63 struct hpet __iomem *hd_hpet;
64 struct hpet_timer __iomem *hd_timer;
65 unsigned long hd_ireqfreq;
66 unsigned long hd_irqdata;
67 wait_queue_head_t hd_waitqueue;
68 struct fasync_struct *hd_async_queue;
69 struct hpet_task *hd_task;
70 unsigned int hd_flags;
72 unsigned int hd_hdwirq;
73 char hd_name[HPET_DEV_NAME];
77 struct hpets *hp_next;
78 struct hpet __iomem *hp_hpet;
79 unsigned long hp_hpet_phys;
80 struct time_interpolator *hp_interpolator;
81 unsigned long long hp_tick_freq;
82 unsigned long hp_delta;
83 unsigned int hp_ntimer;
84 unsigned int hp_which;
85 struct hpet_dev hp_dev[1];
88 static struct hpets *hpets;
90 #define HPET_OPEN 0x0001
91 #define HPET_IE 0x0002 /* interrupt enabled */
92 #define HPET_PERIODIC 0x0004
94 #if BITS_PER_LONG == 64
95 #define write_counter(V, MC) writeq(V, MC)
96 #define read_counter(MC) readq(MC)
98 #define write_counter(V, MC) writel(V, MC)
99 #define read_counter(MC) readl(MC)
103 static inline unsigned long long readq(void __iomem *addr)
105 return readl(addr) | (((unsigned long long)readl(addr + 4)) << 32LL);
110 static inline void writeq(unsigned long long v, void __iomem *addr)
112 writel(v & 0xffffffff, addr);
113 writel(v >> 32, addr + 4);
117 static irqreturn_t hpet_interrupt(int irq, void *data, struct pt_regs *regs)
119 struct hpet_dev *devp;
124 spin_lock(&hpet_lock);
128 * For non-periodic timers, increment the accumulator.
129 * This has the effect of treating non-periodic like periodic.
131 if ((devp->hd_flags & (HPET_IE | HPET_PERIODIC)) == HPET_IE) {
134 t = devp->hd_ireqfreq;
135 m = read_counter(&devp->hd_hpet->hpet_mc);
136 write_counter(t + m + devp->hd_hpets->hp_delta,
137 &devp->hd_timer->hpet_compare);
140 isr = (1 << (devp - devp->hd_hpets->hp_dev));
141 writeq(isr, &devp->hd_hpet->hpet_isr);
142 spin_unlock(&hpet_lock);
144 spin_lock(&hpet_task_lock);
146 devp->hd_task->ht_func(devp->hd_task->ht_data);
147 spin_unlock(&hpet_task_lock);
149 wake_up_interruptible(&devp->hd_waitqueue);
151 kill_fasync(&devp->hd_async_queue, SIGIO, POLL_IN);
156 static int hpet_open(struct inode *inode, struct file *file)
158 struct hpet_dev *devp;
162 if (file->f_mode & FMODE_WRITE)
165 spin_lock_irq(&hpet_lock);
167 for (devp = NULL, hpetp = hpets; hpetp && !devp; hpetp = hpetp->hp_next)
168 for (i = 0; i < hpetp->hp_ntimer; i++)
169 if (hpetp->hp_dev[i].hd_flags & HPET_OPEN
170 || hpetp->hp_dev[i].hd_task)
173 devp = &hpetp->hp_dev[i];
178 spin_unlock_irq(&hpet_lock);
182 file->private_data = devp;
183 devp->hd_irqdata = 0;
184 devp->hd_flags |= HPET_OPEN;
185 spin_unlock_irq(&hpet_lock);
191 hpet_read(struct file *file, char __user *buf, size_t count, loff_t * ppos)
193 DECLARE_WAITQUEUE(wait, current);
196 struct hpet_dev *devp;
198 devp = file->private_data;
199 if (!devp->hd_ireqfreq)
202 if (count < sizeof(unsigned long))
205 add_wait_queue(&devp->hd_waitqueue, &wait);
208 set_current_state(TASK_INTERRUPTIBLE);
210 spin_lock_irq(&hpet_lock);
211 data = devp->hd_irqdata;
212 devp->hd_irqdata = 0;
213 spin_unlock_irq(&hpet_lock);
217 else if (file->f_flags & O_NONBLOCK) {
220 } else if (signal_pending(current)) {
221 retval = -ERESTARTSYS;
227 retval = put_user(data, (unsigned long __user *)buf);
229 retval = sizeof(unsigned long);
231 __set_current_state(TASK_RUNNING);
232 remove_wait_queue(&devp->hd_waitqueue, &wait);
237 static unsigned int hpet_poll(struct file *file, poll_table * wait)
240 struct hpet_dev *devp;
242 devp = file->private_data;
244 if (!devp->hd_ireqfreq)
247 poll_wait(file, &devp->hd_waitqueue, wait);
249 spin_lock_irq(&hpet_lock);
250 v = devp->hd_irqdata;
251 spin_unlock_irq(&hpet_lock);
254 return POLLIN | POLLRDNORM;
259 static int hpet_mmap(struct file *file, struct vm_area_struct *vma)
261 #ifdef CONFIG_HPET_MMAP
262 struct hpet_dev *devp;
265 if (((vma->vm_end - vma->vm_start) != PAGE_SIZE) || vma->vm_pgoff)
268 devp = file->private_data;
269 addr = devp->hd_hpets->hp_hpet_phys;
271 if (addr & (PAGE_SIZE - 1))
274 vma->vm_flags |= VM_IO;
275 vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot);
277 if (io_remap_pfn_range(vma, vma->vm_start, addr >> PAGE_SHIFT,
278 PAGE_SIZE, vma->vm_page_prot)) {
279 printk(KERN_ERR "remap_pfn_range failed in hpet.c\n");
289 static int hpet_fasync(int fd, struct file *file, int on)
291 struct hpet_dev *devp;
293 devp = file->private_data;
295 if (fasync_helper(fd, file, on, &devp->hd_async_queue) >= 0)
301 static int hpet_release(struct inode *inode, struct file *file)
303 struct hpet_dev *devp;
304 struct hpet_timer __iomem *timer;
307 devp = file->private_data;
308 timer = devp->hd_timer;
310 spin_lock_irq(&hpet_lock);
312 writeq((readq(&timer->hpet_config) & ~Tn_INT_ENB_CNF_MASK),
313 &timer->hpet_config);
318 devp->hd_ireqfreq = 0;
320 if (devp->hd_flags & HPET_PERIODIC
321 && readq(&timer->hpet_config) & Tn_TYPE_CNF_MASK) {
324 v = readq(&timer->hpet_config);
325 v ^= Tn_TYPE_CNF_MASK;
326 writeq(v, &timer->hpet_config);
329 devp->hd_flags &= ~(HPET_OPEN | HPET_IE | HPET_PERIODIC);
330 spin_unlock_irq(&hpet_lock);
335 if (file->f_flags & FASYNC)
336 hpet_fasync(-1, file, 0);
338 file->private_data = NULL;
342 static int hpet_ioctl_common(struct hpet_dev *, int, unsigned long, int);
345 hpet_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
348 struct hpet_dev *devp;
350 devp = file->private_data;
351 return hpet_ioctl_common(devp, cmd, arg, 0);
354 static int hpet_ioctl_ieon(struct hpet_dev *devp)
356 struct hpet_timer __iomem *timer;
357 struct hpet __iomem *hpet;
360 unsigned long g, v, t, m;
361 unsigned long flags, isr;
363 timer = devp->hd_timer;
364 hpet = devp->hd_hpet;
365 hpetp = devp->hd_hpets;
367 if (!devp->hd_ireqfreq)
370 spin_lock_irq(&hpet_lock);
372 if (devp->hd_flags & HPET_IE) {
373 spin_unlock_irq(&hpet_lock);
377 devp->hd_flags |= HPET_IE;
378 spin_unlock_irq(&hpet_lock);
380 irq = devp->hd_hdwirq;
383 sprintf(devp->hd_name, "hpet%d", (int)(devp - hpetp->hp_dev));
386 (irq, hpet_interrupt, SA_INTERRUPT, devp->hd_name, (void *)devp)) {
387 printk(KERN_ERR "hpet: IRQ %d is not free\n", irq);
393 spin_lock_irq(&hpet_lock);
394 devp->hd_flags ^= HPET_IE;
395 spin_unlock_irq(&hpet_lock);
400 t = devp->hd_ireqfreq;
401 v = readq(&timer->hpet_config);
402 g = v | Tn_INT_ENB_CNF_MASK;
404 if (devp->hd_flags & HPET_PERIODIC) {
405 write_counter(t, &timer->hpet_compare);
406 g |= Tn_TYPE_CNF_MASK;
407 v |= Tn_TYPE_CNF_MASK;
408 writeq(v, &timer->hpet_config);
409 v |= Tn_VAL_SET_CNF_MASK;
410 writeq(v, &timer->hpet_config);
411 local_irq_save(flags);
412 m = read_counter(&hpet->hpet_mc);
413 write_counter(t + m + hpetp->hp_delta, &timer->hpet_compare);
415 local_irq_save(flags);
416 m = read_counter(&hpet->hpet_mc);
417 write_counter(t + m + hpetp->hp_delta, &timer->hpet_compare);
420 isr = (1 << (devp - hpets->hp_dev));
421 writeq(isr, &hpet->hpet_isr);
422 writeq(g, &timer->hpet_config);
423 local_irq_restore(flags);
428 /* converts Hz to number of timer ticks */
429 static inline unsigned long hpet_time_div(struct hpets *hpets,
432 unsigned long long m;
434 m = hpets->hp_tick_freq + (dis >> 1);
436 return (unsigned long)m;
440 hpet_ioctl_common(struct hpet_dev *devp, int cmd, unsigned long arg, int kernel)
442 struct hpet_timer __iomem *timer;
443 struct hpet __iomem *hpet;
454 timer = devp->hd_timer;
455 hpet = devp->hd_hpet;
456 hpetp = devp->hd_hpets;
459 return hpet_ioctl_ieon(devp);
468 if ((devp->hd_flags & HPET_IE) == 0)
470 v = readq(&timer->hpet_config);
471 v &= ~Tn_INT_ENB_CNF_MASK;
472 writeq(v, &timer->hpet_config);
474 free_irq(devp->hd_irq, devp);
477 devp->hd_flags ^= HPET_IE;
481 struct hpet_info info;
483 info.hi_ireqfreq = hpet_time_div(hpetp,
486 readq(&timer->hpet_config) & Tn_PER_INT_CAP_MASK;
487 info.hi_hpet = devp->hd_hpets->hp_which;
488 info.hi_timer = devp - devp->hd_hpets->hp_dev;
489 if (copy_to_user((void __user *)arg, &info, sizeof(info)))
494 v = readq(&timer->hpet_config);
495 if ((v & Tn_PER_INT_CAP_MASK) == 0) {
499 devp->hd_flags |= HPET_PERIODIC;
502 v = readq(&timer->hpet_config);
503 if ((v & Tn_PER_INT_CAP_MASK) == 0) {
507 if (devp->hd_flags & HPET_PERIODIC &&
508 readq(&timer->hpet_config) & Tn_TYPE_CNF_MASK) {
509 v = readq(&timer->hpet_config);
510 v ^= Tn_TYPE_CNF_MASK;
511 writeq(v, &timer->hpet_config);
513 devp->hd_flags &= ~HPET_PERIODIC;
516 if (!kernel && (arg > hpet_max_freq) &&
517 !capable(CAP_SYS_RESOURCE)) {
527 devp->hd_ireqfreq = hpet_time_div(hpetp, arg);
533 static struct file_operations hpet_fops = {
534 .owner = THIS_MODULE,
540 .release = hpet_release,
541 .fasync = hpet_fasync,
545 EXPORT_SYMBOL(hpet_alloc);
546 EXPORT_SYMBOL(hpet_register);
547 EXPORT_SYMBOL(hpet_unregister);
548 EXPORT_SYMBOL(hpet_control);
550 int hpet_register(struct hpet_task *tp, int periodic)
554 struct hpet_timer __iomem *timer;
555 struct hpet_dev *devp;
560 mask = Tn_PER_INT_CAP_MASK;
569 spin_lock_irq(&hpet_task_lock);
570 spin_lock(&hpet_lock);
572 for (devp = NULL, hpetp = hpets; hpetp && !devp; hpetp = hpetp->hp_next)
573 for (timer = hpetp->hp_hpet->hpet_timers, i = 0;
574 i < hpetp->hp_ntimer; i++, timer++) {
575 if ((readq(&timer->hpet_config) & Tn_PER_INT_CAP_MASK)
579 devp = &hpetp->hp_dev[i];
581 if (devp->hd_flags & HPET_OPEN || devp->hd_task) {
586 tp->ht_opaque = devp;
591 spin_unlock(&hpet_lock);
592 spin_unlock_irq(&hpet_task_lock);
600 static inline int hpet_tpcheck(struct hpet_task *tp)
602 struct hpet_dev *devp;
605 devp = tp->ht_opaque;
610 for (hpetp = hpets; hpetp; hpetp = hpetp->hp_next)
611 if (devp >= hpetp->hp_dev
612 && devp < (hpetp->hp_dev + hpetp->hp_ntimer)
613 && devp->hd_hpet == hpetp->hp_hpet)
619 int hpet_unregister(struct hpet_task *tp)
621 struct hpet_dev *devp;
622 struct hpet_timer __iomem *timer;
625 if ((err = hpet_tpcheck(tp)))
628 spin_lock_irq(&hpet_task_lock);
629 spin_lock(&hpet_lock);
631 devp = tp->ht_opaque;
632 if (devp->hd_task != tp) {
633 spin_unlock(&hpet_lock);
634 spin_unlock_irq(&hpet_task_lock);
638 timer = devp->hd_timer;
639 writeq((readq(&timer->hpet_config) & ~Tn_INT_ENB_CNF_MASK),
640 &timer->hpet_config);
641 devp->hd_flags &= ~(HPET_IE | HPET_PERIODIC);
642 devp->hd_task = NULL;
643 spin_unlock(&hpet_lock);
644 spin_unlock_irq(&hpet_task_lock);
649 int hpet_control(struct hpet_task *tp, unsigned int cmd, unsigned long arg)
651 struct hpet_dev *devp;
654 if ((err = hpet_tpcheck(tp)))
657 spin_lock_irq(&hpet_lock);
658 devp = tp->ht_opaque;
659 if (devp->hd_task != tp) {
660 spin_unlock_irq(&hpet_lock);
663 spin_unlock_irq(&hpet_lock);
664 return hpet_ioctl_common(devp, cmd, arg, 1);
667 static ctl_table hpet_table[] = {
670 .procname = "max-user-freq",
671 .data = &hpet_max_freq,
672 .maxlen = sizeof(int),
674 .proc_handler = &proc_dointvec,
679 static ctl_table hpet_root[] = {
690 static ctl_table dev_root[] = {
701 static struct ctl_table_header *sysctl_header;
703 static void hpet_register_interpolator(struct hpets *hpetp)
705 #ifdef CONFIG_TIME_INTERPOLATION
706 struct time_interpolator *ti;
708 ti = kmalloc(sizeof(*ti), GFP_KERNEL);
712 memset(ti, 0, sizeof(*ti));
713 ti->source = TIME_SOURCE_MMIO64;
715 ti->addr = &hpetp->hp_hpet->hpet_mc;
716 ti->frequency = hpetp->hp_tick_freq;
717 ti->drift = HPET_DRIFT;
720 hpetp->hp_interpolator = ti;
721 register_time_interpolator(ti);
726 * Adjustment for when arming the timer with
727 * initial conditions. That is, main counter
728 * ticks expired before interrupts are enabled.
730 #define TICK_CALIBRATE (1000UL)
732 static unsigned long hpet_calibrate(struct hpets *hpetp)
734 struct hpet_timer __iomem *timer = NULL;
735 unsigned long t, m, count, i, flags, start;
736 struct hpet_dev *devp;
738 struct hpet __iomem *hpet;
740 for (j = 0, devp = hpetp->hp_dev; j < hpetp->hp_ntimer; j++, devp++)
741 if ((devp->hd_flags & HPET_OPEN) == 0) {
742 timer = devp->hd_timer;
749 hpet = hpets->hp_hpet;
750 t = read_counter(&timer->hpet_compare);
753 count = hpet_time_div(hpetp, TICK_CALIBRATE);
755 local_irq_save(flags);
757 start = read_counter(&hpet->hpet_mc);
760 m = read_counter(&hpet->hpet_mc);
761 write_counter(t + m + hpetp->hp_delta, &timer->hpet_compare);
762 } while (i++, (m - start) < count);
764 local_irq_restore(flags);
766 return (m - start) / i;
769 int hpet_alloc(struct hpet_data *hdp)
772 struct hpet_dev *devp;
776 struct hpet __iomem *hpet;
777 static struct hpets *last = (struct hpets *)0;
778 unsigned long ns, period;
779 unsigned long long temp;
782 * hpet_alloc can be called by platform dependent code.
783 * if platform dependent code has allocated the hpet
784 * ACPI also reports hpet, then we catch it here.
786 for (hpetp = hpets; hpetp; hpetp = hpetp->hp_next)
787 if (hpetp->hp_hpet == hdp->hd_address)
790 siz = sizeof(struct hpets) + ((hdp->hd_nirqs - 1) *
791 sizeof(struct hpet_dev));
793 hpetp = kmalloc(siz, GFP_KERNEL);
798 memset(hpetp, 0, siz);
800 hpetp->hp_which = hpet_nhpet++;
801 hpetp->hp_hpet = hdp->hd_address;
802 hpetp->hp_hpet_phys = hdp->hd_phys_address;
804 hpetp->hp_ntimer = hdp->hd_nirqs;
806 for (i = 0; i < hdp->hd_nirqs; i++)
807 hpetp->hp_dev[i].hd_hdwirq = hdp->hd_irq[i];
809 hpet = hpetp->hp_hpet;
811 cap = readq(&hpet->hpet_cap);
813 ntimer = ((cap & HPET_NUM_TIM_CAP_MASK) >> HPET_NUM_TIM_CAP_SHIFT) + 1;
815 if (hpetp->hp_ntimer != ntimer) {
816 printk(KERN_WARNING "hpet: number irqs doesn't agree"
817 " with number of timers\n");
823 last->hp_next = hpetp;
829 period = (cap & HPET_COUNTER_CLK_PERIOD_MASK) >>
830 HPET_COUNTER_CLK_PERIOD_SHIFT; /* fs, 10^-15 */
831 temp = 1000000000000000uLL; /* 10^15 femtoseconds per second */
832 temp += period >> 1; /* round */
833 do_div(temp, period);
834 hpetp->hp_tick_freq = temp; /* ticks per second */
836 printk(KERN_INFO "hpet%d: at MMIO 0x%lx, IRQ%s",
837 hpetp->hp_which, hdp->hd_phys_address,
838 hpetp->hp_ntimer > 1 ? "s" : "");
839 for (i = 0; i < hpetp->hp_ntimer; i++)
840 printk("%s %d", i > 0 ? "," : "", hdp->hd_irq[i]);
843 ns = period / 1000000; /* convert to nanoseconds, 10^-9 */
844 printk(KERN_INFO "hpet%d: %ldns tick, %d %d-bit timers\n",
845 hpetp->hp_which, ns, hpetp->hp_ntimer,
846 cap & HPET_COUNTER_SIZE_MASK ? 64 : 32);
848 mcfg = readq(&hpet->hpet_config);
849 if ((mcfg & HPET_ENABLE_CNF_MASK) == 0) {
850 write_counter(0L, &hpet->hpet_mc);
851 mcfg |= HPET_ENABLE_CNF_MASK;
852 writeq(mcfg, &hpet->hpet_config);
855 for (i = 0, devp = hpetp->hp_dev; i < hpetp->hp_ntimer; i++, devp++) {
856 struct hpet_timer __iomem *timer;
858 timer = &hpet->hpet_timers[devp - hpetp->hp_dev];
860 devp->hd_hpets = hpetp;
861 devp->hd_hpet = hpet;
862 devp->hd_timer = timer;
865 * If the timer was reserved by platform code,
866 * then make timer unavailable for opens.
868 if (hdp->hd_state & (1 << i)) {
869 devp->hd_flags = HPET_OPEN;
873 init_waitqueue_head(&devp->hd_waitqueue);
876 hpetp->hp_delta = hpet_calibrate(hpetp);
877 hpet_register_interpolator(hpetp);
882 static acpi_status hpet_resources(struct acpi_resource *res, void *data)
884 struct hpet_data *hdp;
886 struct acpi_resource_address64 addr;
891 status = acpi_resource_to_address64(res, &addr);
893 if (ACPI_SUCCESS(status)) {
896 size = addr.max_address_range - addr.min_address_range + 1;
897 hdp->hd_phys_address = addr.min_address_range;
898 hdp->hd_address = ioremap(addr.min_address_range, size);
900 for (hpetp = hpets; hpetp; hpetp = hpetp->hp_next)
901 if (hpetp->hp_hpet == hdp->hd_address)
903 } else if (res->id == ACPI_RSTYPE_EXT_IRQ) {
904 struct acpi_resource_ext_irq *irqp;
907 irqp = &res->data.extended_irq;
909 if (irqp->number_of_interrupts > 0) {
910 hdp->hd_nirqs = irqp->number_of_interrupts;
912 for (i = 0; i < hdp->hd_nirqs; i++) {
914 acpi_register_gsi(irqp->interrupts[i],
916 irqp->active_high_low);
927 static int hpet_acpi_add(struct acpi_device *device)
930 struct hpet_data data;
932 memset(&data, 0, sizeof(data));
935 acpi_walk_resources(device->handle, METHOD_NAME__CRS,
936 hpet_resources, &data);
938 if (ACPI_FAILURE(result))
941 if (!data.hd_address || !data.hd_nirqs) {
942 printk("%s: no address or irqs in _CRS\n", __FUNCTION__);
946 return hpet_alloc(&data);
949 static int hpet_acpi_remove(struct acpi_device *device, int type)
951 /* XXX need to unregister interpolator, dealloc mem, etc */
955 static struct acpi_driver hpet_acpi_driver = {
959 .add = hpet_acpi_add,
960 .remove = hpet_acpi_remove,
964 static struct miscdevice hpet_misc = { HPET_MINOR, "hpet", &hpet_fops };
966 static int __init hpet_init(void)
970 result = misc_register(&hpet_misc);
974 sysctl_header = register_sysctl_table(dev_root, 0);
976 result = acpi_bus_register_driver(&hpet_acpi_driver);
979 unregister_sysctl_table(sysctl_header);
980 misc_deregister(&hpet_misc);
987 static void __exit hpet_exit(void)
989 acpi_bus_unregister_driver(&hpet_acpi_driver);
992 unregister_sysctl_table(sysctl_header);
993 misc_deregister(&hpet_misc);
998 module_init(hpet_init);
999 module_exit(hpet_exit);
1000 MODULE_AUTHOR("Bob Picco <Robert.Picco@hp.com>");
1001 MODULE_LICENSE("GPL");