Lines Matching full:hpet
35 #include <linux/hpet.h>
43 * See HPET spec revision 1.
48 #define HPET_RANGE_SIZE 1024 /* from HPET spec */
76 .name = "hpet",
85 /* A lock for concurrent access by app and isr hpet activity. */
92 struct hpet __iomem *hd_hpet;
106 struct hpet __iomem *hp_hpet;
160 struct hpet __iomem *hpet = devp->hd_hpet; in hpet_interrupt() local
165 mc = read_counter(&hpet->hpet_mc); in hpet_interrupt()
174 * where t is the interval in hpet ticks for the given freq, in hpet_interrupt()
374 pr_info("HPET mmap %s\n", hpet_mmap_enabled ? "enabled" : "disabled"); in hpet_mmap_enable()
456 struct hpet __iomem *hpet; in hpet_ioctl_ieon() local
463 hpet = devp->hd_hpet; in hpet_ioctl_ieon()
495 write_counter(read_counter(&hpet->hpet_mc), in hpet_ioctl_ieon()
499 writel(isr, &hpet->hpet_isr); in hpet_ioctl_ieon()
502 sprintf(devp->hd_name, "hpet%d", (int)(devp - hpetp->hp_dev)); in hpet_ioctl_ieon()
506 printk(KERN_ERR "hpet: IRQ %d is not free\n", irq); in hpet_ioctl_ieon()
540 m = read_counter(&hpet->hpet_mc); in hpet_ioctl_ieon()
549 m = read_counter(&hpet->hpet_mc); in hpet_ioctl_ieon()
555 writel(isr, &hpet->hpet_isr); in hpet_ioctl_ieon()
751 .procname = "hpet",
784 struct hpet __iomem *hpet; in __hpet_calibrate() local
795 hpet = hpetp->hp_hpet; in __hpet_calibrate()
803 start = read_counter(&hpet->hpet_mc); in __hpet_calibrate()
806 m = read_counter(&hpet->hpet_mc); in __hpet_calibrate()
841 struct hpet __iomem *hpet; in hpet_alloc() local
849 * If platform dependent code has allocated the hpet that in hpet_alloc()
853 printk(KERN_DEBUG "%s: duplicate HPET ignored\n", in hpet_alloc()
873 hpet = hpetp->hp_hpet; in hpet_alloc()
875 cap = readq(&hpet->hpet_cap); in hpet_alloc()
880 printk(KERN_WARNING "hpet: number irqs doesn't agree" in hpet_alloc()
900 printk(KERN_INFO "hpet%d: at MMIO 0x%lx, IRQ%s", in hpet_alloc()
910 "hpet%u: %u comparators, %d-bit %u.%06u MHz counter\n", in hpet_alloc()
915 mcfg = readq(&hpet->hpet_config); in hpet_alloc()
917 write_counter(0L, &hpet->hpet_mc); in hpet_alloc()
919 writeq(mcfg, &hpet->hpet_config); in hpet_alloc()
925 timer = &hpet->hpet_timers[devp - hpetp->hp_dev]; in hpet_alloc()
928 devp->hd_hpet = hpet; in hpet_alloc()
1047 .name = "hpet",
1054 static struct miscdevice hpet_misc = { HPET_MINOR, "hpet", &hpet_fops };