Lines Matching refs:hpetp

248 	struct hpets *hpetp;  in hpet_open()  local
257 for (devp = NULL, hpetp = hpets; hpetp && !devp; hpetp = hpetp->hp_next) in hpet_open()
258 for (i = 0; i < hpetp->hp_ntimer; i++) in hpet_open()
259 if (hpetp->hp_dev[i].hd_flags & HPET_OPEN) in hpet_open()
262 devp = &hpetp->hp_dev[i]; in hpet_open()
437 struct hpets *hpetp; in hpet_ioctl_ieon() local
444 hpetp = devp->hd_hpets; in hpet_ioctl_ieon()
482 sprintf(devp->hd_name, "hpet%d", (int)(devp - hpetp->hp_dev)); in hpet_ioctl_ieon()
522 write_counter(t + m + hpetp->hp_delta, &timer->hpet_compare); in hpet_ioctl_ieon()
531 write_counter(t + m + hpetp->hp_delta, &timer->hpet_compare); in hpet_ioctl_ieon()
561 struct hpets *hpetp; in hpet_ioctl_common() local
573 hpetp = devp->hd_hpets; in hpet_ioctl_common()
601 hpet_time_div(hpetp, devp->hd_ireqfreq); in hpet_ioctl_common()
604 info->hi_hpet = hpetp->hp_which; in hpet_ioctl_common()
605 info->hi_timer = devp - hpetp->hp_dev; in hpet_ioctl_common()
642 devp->hd_ireqfreq = hpet_time_div(hpetp, arg); in hpet_ioctl_common()
713 struct hpets *hpetp; in hpet_is_known() local
715 for (hpetp = hpets; hpetp; hpetp = hpetp->hp_next) in hpet_is_known()
716 if (hpetp->hp_hpet_phys == hdp->hd_phys_address) in hpet_is_known()
762 static unsigned long __hpet_calibrate(struct hpets *hpetp) in __hpet_calibrate() argument
770 for (j = 0, devp = hpetp->hp_dev; j < hpetp->hp_ntimer; j++, devp++) in __hpet_calibrate()
779 hpet = hpetp->hp_hpet; in __hpet_calibrate()
783 count = hpet_time_div(hpetp, TICK_CALIBRATE); in __hpet_calibrate()
791 write_counter(t + m + hpetp->hp_delta, &timer->hpet_compare); in __hpet_calibrate()
799 static unsigned long hpet_calibrate(struct hpets *hpetp) in hpet_calibrate() argument
810 tmp = __hpet_calibrate(hpetp); in hpet_calibrate()
824 struct hpets *hpetp; in hpet_alloc() local
846 hpetp = kzalloc(siz, GFP_KERNEL); in hpet_alloc()
848 if (!hpetp) in hpet_alloc()
851 hpetp->hp_which = hpet_nhpet++; in hpet_alloc()
852 hpetp->hp_hpet = hdp->hd_address; in hpet_alloc()
853 hpetp->hp_hpet_phys = hdp->hd_phys_address; in hpet_alloc()
855 hpetp->hp_ntimer = hdp->hd_nirqs; in hpet_alloc()
858 hpetp->hp_dev[i].hd_hdwirq = hdp->hd_irq[i]; in hpet_alloc()
860 hpet = hpetp->hp_hpet; in hpet_alloc()
866 if (hpetp->hp_ntimer != ntimer) { in hpet_alloc()
869 kfree(hpetp); in hpet_alloc()
874 last->hp_next = hpetp; in hpet_alloc()
876 hpets = hpetp; in hpet_alloc()
878 last = hpetp; in hpet_alloc()
885 hpetp->hp_tick_freq = temp; /* ticks per second */ in hpet_alloc()
888 hpetp->hp_which, hdp->hd_phys_address, in hpet_alloc()
889 hpetp->hp_ntimer > 1 ? "s" : ""); in hpet_alloc()
890 for (i = 0; i < hpetp->hp_ntimer; i++) in hpet_alloc()
894 temp = hpetp->hp_tick_freq; in hpet_alloc()
898 hpetp->hp_which, hpetp->hp_ntimer, in hpet_alloc()
909 for (i = 0, devp = hpetp->hp_dev; i < hpetp->hp_ntimer; i++, devp++) { in hpet_alloc()
912 timer = &hpet->hpet_timers[devp - hpetp->hp_dev]; in hpet_alloc()
914 devp->hd_hpets = hpetp; in hpet_alloc()
930 hpetp->hp_delta = hpet_calibrate(hpetp); in hpet_alloc()
935 hpet_mctr = (void __iomem *)&hpetp->hp_hpet->hpet_mc; in hpet_alloc()
937 clocksource_hpet.mult = clocksource_hz2mult(hpetp->hp_tick_freq, in hpet_alloc()
940 hpetp->hp_clocksource = &clocksource_hpet; in hpet_alloc()