clock.h revision 178429
1139731Simp/*- 22858Swollman * Kernel interface to machine-dependent clock driver. 32858Swollman * Garrett Wollman, September 1994. 42858Swollman * This file is in the public domain. 512533Swollman * 650477Speter * $FreeBSD: head/sys/amd64/include/clock.h 178429 2008-04-22 19:38:30Z phk $ 72858Swollman */ 82858Swollman 92858Swollman#ifndef _MACHINE_CLOCK_H_ 104174Sbde#define _MACHINE_CLOCK_H_ 112858Swollman 1255205Speter#ifdef _KERNEL 134174Sbde/* 144174Sbde * i386 to clock driver interface. 1533809Sbde * XXX large parts of the driver and its interface are misplaced. 164174Sbde */ 17122849Speterextern int clkintr_pending; 1832052Sphkextern int statclock_disable; 19177631Sphkextern u_int i8254_freq; 20177631Sphkextern int i8254_max_count; 21110039Sphkextern uint64_t tsc_freq; 2247592Sphkextern int tsc_is_broken; 234174Sbde 24166186Sbdevoid i8254_init(void); 25166186Sbde 264174Sbde/* 274174Sbde * Driver to clock driver interface. 284174Sbde */ 2919172Sbde 30178429Sphkvoid startrtclock(void); 31110370Sphkvoid init_TSC(void); 32120355Spetervoid init_TSC_tc(void); 334174Sbde 34177642Sphk#define HAS_TIMER_SPKR 1 35177642Sphkint timer_spkr_acquire(void); 36177642Sphkint timer_spkr_release(void); 37177642Sphkvoid timer_spkr_setfreq(int freq); 38177642Sphk 3955205Speter#endif /* _KERNEL */ 4019172Sbde 414174Sbde#endif /* !_MACHINE_CLOCK_H_ */ 42