1178172Simp/* 2178172Simp * Garrett Wollman, September 1994. 3178172Simp * This file is in the public domain. 4178172Simp * Kernel interface to machine-dependent clock driver. 5178172Simp * 6178172Simp * JNPR: clock.h,v 1.6.2.1 2007/08/29 09:36:05 girish 7178172Simp * from: src/sys/alpha/include/clock.h,v 1.5 1999/12/29 04:27:55 peter 8178172Simp * $FreeBSD$ 9178172Simp */ 10178172Simp 11178172Simp#ifndef _MACHINE_CLOCK_H_ 12178172Simp#define _MACHINE_CLOCK_H_ 13178172Simp 14178172Simp#include <sys/bus.h> 15178172Simp 16178172Simp#ifdef _KERNEL 17178172Simp 18178172Simpextern int cpu_clock; 19178172Simp 20178172Simp#define wall_cmos_clock 0 21178172Simp#define adjkerntz 0 22178172Simp 23178172Simp/* 24178172Simp * Default is to assume a CPU pipeline clock of 100Mhz, and 25178172Simp * that CP0_COUNT increments every 2 cycles. 26178172Simp */ 27178172Simp#define MIPS_DEFAULT_HZ (100 * 1000 * 1000) 28178172Simp 29178172Simpvoid mips_timer_early_init(uint64_t clock_hz); 30178172Simpvoid mips_timer_init_params(uint64_t, int); 31178172Simp 32178172Simpextern uint64_t counter_freq; 33178172Simpextern int clocks_running; 34178172Simp 35205364Sneel/* 36205364Sneel * The 'platform_timecounter' pointer may be used to register a 37205364Sneel * platform-specific timecounter. 38205364Sneel * 39205364Sneel * A default timecounter based on the CP0 COUNT register is always registered. 40205364Sneel */ 41205364Sneelextern struct timecounter *platform_timecounter; 42205364Sneel 43178172Simp#endif 44178172Simp 45178172Simp#endif /* !_MACHINE_CLOCK_H_ */ 46