aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcel Moolenaar <marcel@FreeBSD.org>2006-02-24 05:40:17 +0000
committerMarcel Moolenaar <marcel@FreeBSD.org>2006-02-24 05:40:17 +0000
commitea54941449f91ed73a68a06ddb41716fdf5a4a5a (patch)
tree1a5d674c76a9410a6917b62d08fd0cbedc3c5157
parent0bb90c9d57396af95bc51ca291b309c835c9a8fa (diff)
downloadsrc-ea54941449f91ed73a68a06ddb41716fdf5a4a5a.tar.gz
src-ea54941449f91ed73a68a06ddb41716fdf5a4a5a.zip
Replace our local UART_SIGMASK_* with the global SER_MASK_*.
Notes
Notes: svn path=/head/; revision=155973
-rw-r--r--sys/dev/uart/uart_bus.h5
-rw-r--r--sys/dev/uart/uart_core.c2
-rw-r--r--sys/dev/uart/uart_dev_ns8250.c2
-rw-r--r--sys/dev/uart/uart_dev_sab82532.c2
-rw-r--r--sys/dev/uart/uart_dev_z8530.c4
5 files changed, 5 insertions, 10 deletions
diff --git a/sys/dev/uart/uart_bus.h b/sys/dev/uart/uart_bus.h
index c631fa0692d4..62f41ceb72ef 100644
--- a/sys/dev/uart/uart_bus.h
+++ b/sys/dev/uart/uart_bus.h
@@ -48,11 +48,6 @@
#define UART_STAT_OVERRUN 0x0400
#define UART_STAT_PARERR 0x0800
-#define UART_SIGMASK_DTE (SER_DTR | SER_RTS)
-#define UART_SIGMASK_DCE (SER_DSR | SER_CTS | SER_DCD | SER_RI)
-#define UART_SIGMASK_STATE (UART_SIGMASK_DTE | UART_SIGMASK_DCE)
-#define UART_SIGMASK_DELTA (UART_SIGMASK_STATE << 8)
-
#ifdef UART_PPS_ON_CTS
#define UART_SIG_DPPS SER_DCTS
#define UART_SIG_PPS SER_CTS
diff --git a/sys/dev/uart/uart_core.c b/sys/dev/uart/uart_core.c
index c69243ae5e91..9e4a06d67bf8 100644
--- a/sys/dev/uart/uart_core.c
+++ b/sys/dev/uart/uart_core.c
@@ -171,7 +171,7 @@ uart_intr_sigchg(struct uart_softc *sc)
do {
old = sc->sc_ttypend;
- new = old & ~UART_SIGMASK_STATE;
+ new = old & ~SER_MASK_STATE;
new |= sig & SER_INT_SIGMASK;
new |= SER_INT_SIGCHG;
} while (!atomic_cmpset_32(&sc->sc_ttypend, old, new));
diff --git a/sys/dev/uart/uart_dev_ns8250.c b/sys/dev/uart/uart_dev_ns8250.c
index 264184fd0eb1..b6115787575a 100644
--- a/sys/dev/uart/uart_dev_ns8250.c
+++ b/sys/dev/uart/uart_dev_ns8250.c
@@ -460,7 +460,7 @@ ns8250_bus_getsig(struct uart_softc *sc)
SIGCHG(msr & MSR_CTS, sig, SER_CTS, SER_DCTS);
SIGCHG(msr & MSR_DCD, sig, SER_DCD, SER_DDCD);
SIGCHG(msr & MSR_RI, sig, SER_RI, SER_DRI);
- new = sig & ~UART_SIGMASK_DELTA;
+ new = sig & ~SER_MASK_DELTA;
} while (!atomic_cmpset_32(&sc->sc_hwsig, old, new));
return (sig);
}
diff --git a/sys/dev/uart/uart_dev_sab82532.c b/sys/dev/uart/uart_dev_sab82532.c
index 582bae80b89f..5744873ac439 100644
--- a/sys/dev/uart/uart_dev_sab82532.c
+++ b/sys/dev/uart/uart_dev_sab82532.c
@@ -470,7 +470,7 @@ sab82532_bus_getsig(struct uart_softc *sc)
}
SIGCHG(pvr, sig, SER_DSR, SER_DDSR);
mtx_unlock_spin(&sc->sc_hwmtx);
- new = sig & ~UART_SIGMASK_DELTA;
+ new = sig & ~SER_MASK_DELTA;
} while (!atomic_cmpset_32(&sc->sc_hwsig, old, new));
return (sig);
}
diff --git a/sys/dev/uart/uart_dev_z8530.c b/sys/dev/uart/uart_dev_z8530.c
index 02767106d0e1..8cdefcd6b88f 100644
--- a/sys/dev/uart/uart_dev_z8530.c
+++ b/sys/dev/uart/uart_dev_z8530.c
@@ -354,7 +354,7 @@ z8530_bus_getsig(struct uart_softc *sc)
SIGCHG(bes & BES_CTS, sig, SER_CTS, SER_DCTS);
SIGCHG(bes & BES_DCD, sig, SER_DCD, SER_DDCD);
SIGCHG(bes & BES_SYNC, sig, SER_DSR, SER_DDSR);
- new = sig & ~UART_SIGMASK_DELTA;
+ new = sig & ~SER_MASK_DELTA;
} while (!atomic_cmpset_32(&sc->sc_hwsig, old, new));
return (sig);
}
@@ -439,7 +439,7 @@ z8530_bus_ipend(struct uart_softc *sc)
SIGCHG(bes & BES_CTS, sig, SER_CTS, SER_DCTS);
SIGCHG(bes & BES_DCD, sig, SER_DCD, SER_DDCD);
SIGCHG(bes & BES_SYNC, sig, SER_DSR, SER_DDSR);
- if (sig & UART_SIGMASK_DELTA)
+ if (sig & SER_MASK_DELTA)
ipend |= SER_INT_SIGCHG;
src = uart_getmreg(bas, RR_SRC);
if (src & SRC_OVR) {