summaryrefslogtreecommitdiff
path: root/sys/arch
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2004-07-23 21:00:10 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2004-07-23 21:00:10 +0000
commit62d1ffc4c99bb035a3957704f73585970ffe9109 (patch)
tree6318a548966ab67dca5944fdf39d1f44516f888c /sys/arch
parent9acd6e3fbaced078abf76d7d96a963555317abb1 (diff)
Better delay code for MVME188. Should make console and network much more
reactive.
Diffstat (limited to 'sys/arch')
-rw-r--r--sys/arch/mvme88k/dev/clock.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/sys/arch/mvme88k/dev/clock.c b/sys/arch/mvme88k/dev/clock.c
index 0cf6d10a38c..cb2e4061e38 100644
--- a/sys/arch/mvme88k/dev/clock.c
+++ b/sys/arch/mvme88k/dev/clock.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: clock.c,v 1.31 2004/07/02 14:00:42 miod Exp $ */
+/* $OpenBSD: clock.c,v 1.32 2004/07/23 21:00:09 miod Exp $ */
/*
* Copyright (c) 1999 Steve Murphree, Jr.
* Copyright (c) 1995 Theo de Raadt
@@ -597,10 +597,13 @@ void
delay(int us)
{
if (brdtyp == BRD_188) {
+ extern int cpuspeed;
+
/*
* Unable to use a real timer, use a tight loop.
+ * XXX not accurate!
*/
- volatile int c = (25 * us) / 3; /* XXX not accurate! */
+ volatile int c = (3 * us) / (cpuspeed == 25 ? 4 : 5);
while (--c > 0)
;
} else {