Lines Matching full:hpet
36 #include <linux/hpet.h>
44 * See HPET spec revision 1.
49 #define HPET_RANGE_SIZE 1024 /* from HPET spec */
67 /* A lock for concurrent access by app and isr hpet activity. */
74 struct hpet __iomem *hd_hpet;
88 struct hpet __iomem *hp_hpet;
126 struct hpet __iomem *hpet = devp->hd_hpet; in hpet_interrupt() local
131 mc = read_counter(&hpet->hpet_mc); in hpet_interrupt()
140 * where t is the interval in hpet ticks for the given freq, in hpet_interrupt()
340 pr_info("HPET mmap %s\n", hpet_mmap_enabled ? "enabled" : "disabled"); in hpet_mmap_enable()
422 struct hpet __iomem *hpet; in hpet_ioctl_ieon() local
429 hpet = devp->hd_hpet; in hpet_ioctl_ieon()
461 write_counter(read_counter(&hpet->hpet_mc), in hpet_ioctl_ieon()
465 writel(isr, &hpet->hpet_isr); in hpet_ioctl_ieon()
468 sprintf(devp->hd_name, "hpet%d", (int)(devp - hpetp->hp_dev)); in hpet_ioctl_ieon()
472 printk(KERN_ERR "hpet: IRQ %d is not free\n", irq); in hpet_ioctl_ieon()
506 m = read_counter(&hpet->hpet_mc); in hpet_ioctl_ieon()
515 m = read_counter(&hpet->hpet_mc); in hpet_ioctl_ieon()
521 writel(isr, &hpet->hpet_isr); in hpet_ioctl_ieon()
729 struct hpet __iomem *hpet; in __hpet_calibrate() local
740 hpet = hpetp->hp_hpet; in __hpet_calibrate()
748 start = read_counter(&hpet->hpet_mc); in __hpet_calibrate()
751 m = read_counter(&hpet->hpet_mc); in __hpet_calibrate()
786 struct hpet __iomem *hpet; in hpet_alloc() local
794 * If platform dependent code has allocated the hpet that in hpet_alloc()
798 printk(KERN_DEBUG "%s: duplicate HPET ignored\n", in hpet_alloc()
818 hpet = hpetp->hp_hpet; in hpet_alloc()
820 cap = readq(&hpet->hpet_cap); in hpet_alloc()
825 printk(KERN_WARNING "hpet: number irqs doesn't agree" in hpet_alloc()
845 printk(KERN_INFO "hpet%d: at MMIO 0x%lx, IRQ%s", in hpet_alloc()
855 "hpet%u: %u comparators, %d-bit %u.%06u MHz counter\n", in hpet_alloc()
860 mcfg = readq(&hpet->hpet_config); in hpet_alloc()
862 write_counter(0L, &hpet->hpet_mc); in hpet_alloc()
864 writeq(mcfg, &hpet->hpet_config); in hpet_alloc()
870 timer = &hpet->hpet_timers[devp - hpetp->hp_dev]; in hpet_alloc()
873 devp->hd_hpet = hpet; in hpet_alloc()
982 .name = "hpet",
989 static struct miscdevice hpet_misc = { HPET_MINOR, "hpet", &hpet_fops };
999 sysctl_header = register_sysctl("dev/hpet", hpet_table); in hpet_init()