summaryrefslogtreecommitdiff
path: root/sys/arch/atari/dev/clock.c
diff options
context:
space:
mode:
authorleo <leo@NetBSD.org>1996-12-16 22:03:23 +0000
committerleo <leo@NetBSD.org>1996-12-16 22:03:23 +0000
commit9f8a5d9694eba4e74c204a8ffc005f533e6436c8 (patch)
tree01835514349b2c7d2bf478c40393873dbb5d784d /sys/arch/atari/dev/clock.c
parent977de7d51c65bba13f31ea159e9591167429adb8 (diff)
Move up the initialisations for the delay routine in the initialisation
process. It's now also available to the different device probes.
Diffstat (limited to 'sys/arch/atari/dev/clock.c')
-rw-r--r--sys/arch/atari/dev/clock.c35
1 files changed, 22 insertions, 13 deletions
diff --git a/sys/arch/atari/dev/clock.c b/sys/arch/atari/dev/clock.c
index 618e7ca9757..507fb774dcf 100644
--- a/sys/arch/atari/dev/clock.c
+++ b/sys/arch/atari/dev/clock.c
@@ -1,4 +1,4 @@
-/* $NetBSD: clock.c,v 1.14 1996/12/16 21:24:32 leo Exp $ */
+/* $NetBSD: clock.c,v 1.15 1996/12/16 22:03:23 leo Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@@ -129,6 +129,27 @@ clockmatch(pdp, match, auxp)
struct device *pdp;
void *match, *auxp;
{
+ if (!atari_realconfig) {
+ /*
+ * Initialize Timer-B in the ST-MFP. This timer is used by
+ * the 'delay' function below. This timer is setup to be
+ * continueously counting from 255 back to zero at a
+ * frequency of 614400Hz. We do this *early* in the
+ * initialisation process.
+ */
+ MFP->mf_tbcr = 0; /* Stop timer */
+ MFP->mf_iera &= ~IA_TIMB; /* Disable timer interrupts */
+ MFP->mf_tbdr = 0;
+ MFP->mf_tbcr = T_Q004; /* Start timer */
+
+ /*
+ * Initialize the time structure
+ */
+ time.tv_sec = 0;
+ time.tv_usec = 0;
+
+ return 0;
+ }
if(!strcmp("clock", auxp))
return(1);
return(0);
@@ -178,18 +199,6 @@ void *auxp;
clk2min = statmin;
#endif /* STATCLOCK */
- /*
- * Initialize Timer-B in the ST-MFP. This timer is used by
- * the 'delay' function below. This timer is setup to be
- * continueously counting from 255 back to zero at a
- * frequency of 614400Hz. We do this *early* in the
- * initialisation process.
- */
- MFP->mf_tbcr = 0; /* Stop timer */
- MFP->mf_iera &= ~IA_TIMB; /* Disable timer interrupts */
- MFP->mf_tbdr = 0;
- MFP->mf_tbcr = T_Q004; /* Start timer */
-
}
void cpu_initclocks()