summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2005-11-11 23:59:59 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2005-11-11 23:59:59 +0000
commitb7652e33378f5d83ae05332a05229a72cf03d0b1 (patch)
treec86a1fd41c20ed7a2dc207a332dd1e83c21c976f
parent46f30089dacc6b21308ad5cb9be529035638aa5b (diff)
round clock up
-rw-r--r--sys/arch/arm/xscale/pxa2x0.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/arch/arm/xscale/pxa2x0.c b/sys/arch/arm/xscale/pxa2x0.c
index aaef057b383..a3fed5406d9 100644
--- a/sys/arch/arm/xscale/pxa2x0.c
+++ b/sys/arch/arm/xscale/pxa2x0.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pxa2x0.c,v 1.10 2005/10/31 05:23:32 deraadt Exp $ */
+/* $OpenBSD: pxa2x0.c,v 1.11 2005/11/11 23:59:58 deraadt Exp $ */
/* $NetBSD: pxa2x0.c,v 1.5 2003/12/12 16:42:44 thorpej Exp $ */
/*
@@ -181,6 +181,8 @@ pxaip_attach(struct device *parent, struct device *self, void *aux)
* This takes 2 secs at most.
*/
cpuclock = pxaip_measure_cpuclock(sc) / 1000;
+ if (cpuclock % 1000 > 500)
+ cpuclock = cpuclock + 1000 - cpuclock % 1000;
freq = cpuclock / 1000;
printf(": CPU clock = %d.%03d MHz\n", cpuclock/1000, cpuclock%1000);