Module Name: src
Committed By: isaki
Date: Tue May 22 04:03:03 UTC 2012
Modified Files:
src/sys/arch/x68k/x68k: clock.c
Log Message:
With the freerunnnig mode, set 0 (=256count) not 0xff (=255count)
in Timer-D. It fixes the clock ticked faster when timecounter uses
"mfp" (as default choice). It was introduced in rev 1.24 in 2006.
Thanks tsutsui@ for many comments.
Should be pulled up to netbsd-6 and netbsd-5.
To generate a diff of this commit:
cvs rdiff -u -r1.33 -r1.34 src/sys/arch/x68k/x68k/clock.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/arch/x68k/x68k/clock.c
diff -u src/sys/arch/x68k/x68k/clock.c:1.33 src/sys/arch/x68k/x68k/clock.c:1.34
--- src/sys/arch/x68k/x68k/clock.c:1.33 Tue Feb 8 20:20:26 2011
+++ src/sys/arch/x68k/x68k/clock.c Tue May 22 04:03:03 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: clock.c,v 1.33 2011/02/08 20:20:26 rmind Exp $ */
+/* $NetBSD: clock.c,v 1.34 2012/05/22 04:03:03 isaki Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@@ -39,7 +39,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: clock.c,v 1.33 2011/02/08 20:20:26 rmind Exp $");
+__KERNEL_RCSID(0, "$NetBSD: clock.c,v 1.34 2012/05/22 04:03:03 isaki Exp $");
#include "clock.h"
@@ -143,7 +143,7 @@ cpu_initclocks(void)
mfp_set_tcdr(CLOCKS_PER_SEC / hz);
mfp_bit_set_ierb(MFP_INTR_TIMER_C);
- mfp_set_tddr(0xff); /* maximum free run -- only 8 bits wide */
+ mfp_set_tddr(0); /* maximum free run -- only 8 bits wide */
mfp_set_tcdcr(mfp_get_tcdcr() | 0x07); /* 1/200 prescaler */
tc_init(&tc);