diff options
author | Dale Rahn <drahn@cvs.openbsd.org> | 2001-06-24 04:59:27 +0000 |
---|---|---|
committer | Dale Rahn <drahn@cvs.openbsd.org> | 2001-06-24 04:59:27 +0000 |
commit | 7470294b6b6962b093f9fa97f93f5c8b3d6efa1d (patch) | |
tree | c8796487a44aa3bab6c267cc0a4bbd4c3d028299 /sys | |
parent | 75e89dc0e4d2883c1592d677252c73ec7463a7d4 (diff) |
include header for prototypes, prototype functions, assignment in
conditional cleanup, -W warning cleanups.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/arch/powerpc/powerpc/clock.c | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/sys/arch/powerpc/powerpc/clock.c b/sys/arch/powerpc/powerpc/clock.c index 4650c6e5937..15b2ba6a5a9 100644 --- a/sys/arch/powerpc/powerpc/clock.c +++ b/sys/arch/powerpc/powerpc/clock.c @@ -1,4 +1,4 @@ -/* $OpenBSD: clock.c,v 1.13 2001/06/10 20:01:42 drahn Exp $ */ +/* $OpenBSD: clock.c,v 1.14 2001/06/24 04:59:26 drahn Exp $ */ /* $NetBSD: clock.c,v 1.1 1996/09/30 16:34:40 ws Exp $ */ /* @@ -34,15 +34,23 @@ #include <sys/param.h> #include <sys/kernel.h> +#include <sys/systm.h> +#include <machine/autoconf.h> #include <machine/pio.h> #include <machine/intr.h> +#include <dev/ofw/openfirm.h> #if 0 #include <powerpc/pci/mpc106reg.h> #endif -void resettodr(); +void resettodr(void); +static inline u_quad_t mftb(void); + +/* XXX, called from asm code */ +void decr_intr(struct clockframe *frame); + /* * Initially we assume a processor with a bus frequency of 12.5 MHz. */ @@ -194,6 +202,7 @@ resettodr() } } + void decr_intr(frame) struct clockframe *frame; @@ -288,10 +297,10 @@ calc_delayconst() asm volatile ("mtmsr %0" :: "r"(msr)); break; } - if (phandle = OF_child(qhandle)) + if ((phandle = OF_child(qhandle))) continue; while (qhandle) { - if (phandle = OF_peer(qhandle)) + if ((phandle = OF_peer(qhandle))) break; qhandle = OF_parent(qhandle); } |