From: briggs Date: Thu, 1 Feb 1996 05:05:19 +0000 (+0000) Subject: Clean up and comment a bit. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=ebdcc291b2f26201516fe3d3959cc7a718071b64;p=openbsd Clean up and comment a bit. --- diff --git a/sys/arch/mac68k/mac68k/clockreg.h b/sys/arch/mac68k/mac68k/clockreg.h index 7904b1810d9..d65fde29b12 100644 --- a/sys/arch/mac68k/mac68k/clockreg.h +++ b/sys/arch/mac68k/mac68k/clockreg.h @@ -1,4 +1,4 @@ -/* $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, @@ -34,18 +34,23 @@ * */ /* - 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)