diff options
author | briggs <briggs@cvs.openbsd.org> | 1996-02-01 05:05:20 +0000 |
---|---|---|
committer | briggs <briggs@cvs.openbsd.org> | 1996-02-01 05:05:20 +0000 |
commit | 43c938b5eea74a5b091b2fe22f98af708fa59115 (patch) | |
tree | 0afc387a36130fff975225452f51b615e1553623 /sys/arch/mac68k | |
parent | 0367c2f8533dea86beab29ce7808295e82e09331 (diff) |
Clean up and comment a bit.
Diffstat (limited to 'sys/arch/mac68k')
-rw-r--r-- | sys/arch/mac68k/mac68k/clockreg.h | 25 |
1 files changed, 15 insertions, 10 deletions
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) |