summaryrefslogtreecommitdiffstats
path: root/sys/dev/ppbus/pps.c
diff options
context:
space:
mode:
authornsouch <nsouch@FreeBSD.org>1999-01-30 15:35:39 +0000
committernsouch <nsouch@FreeBSD.org>1999-01-30 15:35:39 +0000
commit10ef2b8422913dafa8c05f64b5d0c07a3d2ad9c0 (patch)
tree40df97b8849853b739d2d4fdbd234d29a62ee63a /sys/dev/ppbus/pps.c
parentc9bc4bf0090c71bd80805b53e37129f6052a7407 (diff)
downloadFreeBSD-src-10ef2b8422913dafa8c05f64b5d0c07a3d2ad9c0.zip
FreeBSD-src-10ef2b8422913dafa8c05f64b5d0c07a3d2ad9c0.tar.gz
Distinguish EPP address/data register. Add EPP address register access to ppi.
Change microseq offsets. Previously, offsets of the program counter where added to the index of the current microinstruction. Make them rely on the index of the next executed microinstruction. Suggested by: Luigi Rizzo <luigi@labinfo.iet.unipi.it>
Diffstat (limited to 'sys/dev/ppbus/pps.c')
-rw-r--r--sys/dev/ppbus/pps.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/sys/dev/ppbus/pps.c b/sys/dev/ppbus/pps.c
index 95b255c..24be094 100644
--- a/sys/dev/ppbus/pps.c
+++ b/sys/dev/ppbus/pps.c
@@ -6,7 +6,7 @@
* this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp
* ----------------------------------------------------------------------------
*
- * $Id: pps.c,v 1.11 1998/08/24 16:31:27 phk Exp $
+ * $Id: pps.c,v 1.12 1998/12/07 21:58:16 archie Exp $
*
* This driver implements a draft-mogul-pps-api-02.txt PPS source.
*
@@ -16,6 +16,7 @@
*/
#include "opt_devfs.h"
+#include "opt_ntp.h"
#include <sys/param.h>
#include <sys/kernel.h>
@@ -133,6 +134,7 @@ ppsopen(dev_t dev, int flags, int fmt, struct proc *p)
if (ppb_request_bus(&sc->pps_dev, PPB_WAIT|PPB_INTR))
return (EINTR);
+ ppb_wctr(&sc->pps_dev, 0);
ppb_wctr(&sc->pps_dev, IRQENABLE);
return(0);
@@ -144,6 +146,10 @@ ppsclose(dev_t dev, int flags, int fmt, struct proc *p)
struct pps_data *sc = softc[minor(dev)];
sc->ppsparam.mode = 0;
+
+ ppb_wdtr(&sc->pps_dev, 0);
+ ppb_wctr(&sc->pps_dev, 0);
+
ppb_release_bus(&sc->pps_dev);
return(0);
}
OpenPOWER on IntegriCloud