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;
125 struct hpet __iomem *hpet = devp->hd_hpet; in hpet_interrupt() local
130 mc = read_counter(&hpet->hpet_mc); in hpet_interrupt()
139 * where t is the interval in hpet ticks for the given freq, in hpet_interrupt()
352 pr_info("HPET mmap %s\n", hpet_mmap_enabled ? "enabled" : "disabled"); in hpet_mmap_enable()
434 struct hpet __iomem *hpet; in hpet_ioctl_ieon() local
441 hpet = devp->hd_hpet; in hpet_ioctl_ieon()
473 write_counter(read_counter(&hpet->hpet_mc), in hpet_ioctl_ieon()
477 writel(isr, &hpet->hpet_isr); in hpet_ioctl_ieon()
480 sprintf(devp->hd_name, "hpet%d", (int)(devp - hpetp->hp_dev)); in hpet_ioctl_ieon()
484 printk(KERN_ERR "hpet: IRQ %d is not free\n", irq); in hpet_ioctl_ieon()
518 m = read_counter(&hpet->hpet_mc); in hpet_ioctl_ieon()
527 m = read_counter(&hpet->hpet_mc); in hpet_ioctl_ieon()
533 writel(isr, &hpet->hpet_isr); in hpet_ioctl_ieon()
752 struct hpet __iomem *hpet; in __hpet_calibrate() local
763 hpet = hpetp->hp_hpet; in __hpet_calibrate()
771 start = read_counter(&hpet->hpet_mc); in __hpet_calibrate()
774 m = read_counter(&hpet->hpet_mc); in __hpet_calibrate()
809 struct hpet __iomem *hpet; in hpet_alloc() local
817 * If platform dependent code has allocated the hpet that in hpet_alloc()
821 printk(KERN_DEBUG "%s: duplicate HPET ignored\n", in hpet_alloc()
841 hpet = hpetp->hp_hpet; in hpet_alloc()
843 cap = readq(&hpet->hpet_cap); in hpet_alloc()
848 printk(KERN_WARNING "hpet: number irqs doesn't agree" in hpet_alloc()
868 printk(KERN_INFO "hpet%u: at MMIO 0x%lx, IRQ%s", in hpet_alloc()
878 "hpet%u: %u comparators, %d-bit %u.%06u MHz counter\n", in hpet_alloc()
883 mcfg = readq(&hpet->hpet_config); in hpet_alloc()
885 write_counter(0L, &hpet->hpet_mc); in hpet_alloc()
887 writeq(mcfg, &hpet->hpet_config); in hpet_alloc()
893 timer = &hpet->hpet_timers[devp - hpetp->hp_dev]; in hpet_alloc()
896 devp->hd_hpet = hpet; in hpet_alloc()
1005 .name = "hpet",
1012 static struct miscdevice hpet_misc = { HPET_MINOR, "hpet", &hpet_fops };
1022 sysctl_header = register_sysctl("dev/hpet", hpet_table); in hpet_init()