Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/mac68k/dev Enable pps support, only if CLOCAL set &...



details:   https://anonhg.NetBSD.org/src/rev/787b9e8ed9c1
branches:  trunk
changeset: 467661:787b9e8ed9c1
user:      wrstuden <wrstuden%NetBSD.org@localhost>
date:      Sat Mar 27 01:17:03 1999 +0000

description:
Enable pps support, only if CLOCAL set & MDMBUF clear and no clock present.

diffstat:

 sys/arch/mac68k/dev/zs.c |  11 ++++++++++-
 1 files changed, 10 insertions(+), 1 deletions(-)

diffs (29 lines):

diff -r 5f4fbd9fc1a7 -r 787b9e8ed9c1 sys/arch/mac68k/dev/zs.c
--- a/sys/arch/mac68k/dev/zs.c  Sat Mar 27 01:15:58 1999 +0000
+++ b/sys/arch/mac68k/dev/zs.c  Sat Mar 27 01:17:03 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: zs.c,v 1.30 1999/03/23 17:55:03 wrstuden Exp $ */
+/*     $NetBSD: zs.c,v 1.31 1999/03/27 01:17:03 wrstuden Exp $ */
 
 /*
  * Copyright (c) 1996-1998 Bill Studenmund
@@ -727,10 +727,19 @@
         */
        if ((cflag & CDTRCTS) && (cflag & (CRTSCTS | MDMBUF)))
                return (EINVAL);
+       cs->cs_rr0_pps = 0;
        if (xcs->cs_hwflags & ZS_HWFLAG_NO_DCD) {
                if (cflag & MDMBUF)
                        return (EINVAL);
                cflag |= CLOCAL;
+       } else {
+               /*
+                * cs->cs_rr0_pps indicates which bit MAY be used for pps.
+                * Enable only if nothing else will want the interrupt and
+                * it's ok to enable interrupts on this line.
+                */
+               if ((cflag & (CLOCAL & MDMBUF)) == CLOCAL)
+                       cs->cs_rr0_pps = ZSRR0_DCD;
        }
        if ((xcs->cs_hwflags & ZS_HWFLAG_NO_CTS) && (cflag & (CRTSCTS | CDTRCTS)))
                return (EINVAL);



Home | Main Index | Thread Index | Old Index