-/* $NetBSD: clockreg.h,v 1.3 1994/10/26 08:46:56 cgd Exp $ */
+/* $NetBSD: clockreg.h,v 1.4 1996/02/01 03:40:26 briggs Exp $ */
/*-
* Copyright (C) 1993 Allen K. Briggs, Chris P. Caputo,
*
*/
/*
- Clock defines and things.
- MacII clock characteristics used.
-*/
-
-
-#include "../include/limits.h" /* to get CLK_TCK */
+ * Clock defines and things.
+ * MacII clock characteristics used.
+ */
#define CLK_SPEED 0.0000012766 /* time to complete a clock (3 MHz) */
-#define CLK_INTERVAL 13055 /* clocks to hit CLK_TCK ticks per sec */
- /* 7526 for 120 Hz. */
- /* 13055 for 60 Hz. */
+#define CLK_INTERVAL 13055 /* clks to hit HZ ticks/sec */
+
+/*
+ * The VIA1 clock speed is 1.2766us, so the timer value above is:
+ *
+ * 1 1,000,000us 1
+ * CLK_INTERVAL = -------- * ----------- * ------
+ * 1.2766us 1s HZ
+ *
+ * where HZ == 60. This gives us 13055.5 and change... We round down.
+ */
#define CLK_INTH (CLK_INTERVAL >> 8)
#define CLK_INTL (CLK_INTERVAL & 0xff)