aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/sio
diff options
context:
space:
mode:
authorPaul Traina <pst@FreeBSD.org>1996-11-02 02:26:06 +0000
committerPaul Traina <pst@FreeBSD.org>1996-11-02 02:26:06 +0000
commit39daae723d6b76c1f743e0b6bf63932783d9545a (patch)
tree09781ce406cbb64cb20092f64885053caf518105 /sys/dev/sio
parent7fe8c7a0267fc03a520e909cf1c97dc30e629015 (diff)
downloadsrc-39daae723d6b76c1f743e0b6bf63932783d9545a.tar.gz
src-39daae723d6b76c1f743e0b6bf63932783d9545a.zip
add in CONSPEED option which controls console serial port speed
Notes
Notes: svn path=/head/; revision=19325
Diffstat (limited to 'sys/dev/sio')
-rw-r--r--sys/dev/sio/sio.c13
-rw-r--r--sys/dev/sio/sioreg.h6
2 files changed, 13 insertions, 6 deletions
diff --git a/sys/dev/sio/sio.c b/sys/dev/sio/sio.c
index 4b4f39d49eb6..2a73b2ff7d47 100644
--- a/sys/dev/sio/sio.c
+++ b/sys/dev/sio/sio.c
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* from: @(#)com.c 7.5 (Berkeley) 5/16/91
- * $Id: sio.c,v 1.146 1996/09/14 04:27:42 bde Exp $
+ * $Id: sio.c,v 1.147 1996/09/30 12:22:27 bde Exp $
*/
#include "opt_comconsole.h"
@@ -329,6 +329,7 @@ static struct cdevsw sio_cdevsw = {
static int comconsole = -1;
static speed_t comdefaultrate = TTYDEF_SPEED;
+static speed_t condefaultrate = CONSPEED;
static u_int com_events; /* input chars + weighted output completions */
static int sio_timeout;
static int sio_timeouts_until_log;
@@ -807,9 +808,11 @@ sioattach(isdp)
com->it_in.c_cflag = TTYDEF_CFLAG | CLOCAL;
com->it_in.c_lflag = TTYDEF_LFLAG;
com->lt_out.c_cflag = com->lt_in.c_cflag = CLOCAL;
- }
+ com->it_in.c_ispeed = com->it_in.c_ospeed = condefaultrate;
+ } else
+ com->it_in.c_ispeed = com->it_in.c_ospeed = comdefaultrate;
+
termioschars(&com->it_in);
- com->it_in.c_ispeed = com->it_in.c_ospeed = comdefaultrate;
com->it_out = com->it_in;
/* attempt to determine UART type */
@@ -2339,7 +2342,7 @@ siocnopen(sp)
/*
* Save all the device control registers except the fifo register
- * and set our default ones (cs8 -parenb speed=comdefaultrate).
+ * and set our default ones (cs8 -parenb speed=condefaultrate).
* We can't save the fifo register since it is read-only.
*/
iobase = siocniobase;
@@ -2356,7 +2359,7 @@ siocnopen(sp)
* data input register. This also reduces the effects of the
* UMC8669F bug.
*/
- divisor = ttspeedtab(comdefaultrate, comspeedtab);
+ divisor = ttspeedtab(condefaultrate, comspeedtab);
dlbl = divisor & 0xFF;
if (sp->dlbl != dlbl)
outb(iobase + com_dlbl, dlbl);
diff --git a/sys/dev/sio/sioreg.h b/sys/dev/sio/sioreg.h
index bc77dd6bdd92..486ac54c51e0 100644
--- a/sys/dev/sio/sioreg.h
+++ b/sys/dev/sio/sioreg.h
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* from: @(#)comreg.h 7.2 (Berkeley) 5/9/91
- * $Id: sioreg.h,v 1.3 1995/01/20 07:34:18 wpaul Exp $
+ * $Id: sioreg.h,v 1.4 1995/12/10 13:39:15 phk Exp $
*/
@@ -119,3 +119,7 @@
#ifndef CONUNIT
#define CONUNIT (0)
#endif
+
+#ifndef CONSPEED
+#define CONSPEED (9600)
+#endif