summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorDavid Gwynne <dlg@cvs.openbsd.org>2008-01-08 00:29:37 +0000
committerDavid Gwynne <dlg@cvs.openbsd.org>2008-01-08 00:29:37 +0000
commitab62351c9aaddf0a4d008e24984ff99bcf12f60c (patch)
treec43ca8a5f0688ff404a53154f6ad2315af1078b0 /sys/dev
parent2c22c02a444b4c6b73ac30b557ac2687cca2ce93 (diff)
the rsc-console on the v880 operates at 115200, not the 9600 we think we
have to force all console devices to. this change passes the right speed to the com code, and continues to use it when the device is opened as the console device. figured out by kettenis@ ok kettenis@ miod@
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/ic/com.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/sys/dev/ic/com.c b/sys/dev/ic/com.c
index eaad0646ea0..9289543619e 100644
--- a/sys/dev/ic/com.c
+++ b/sys/dev/ic/com.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: com.c,v 1.118 2007/08/22 09:22:30 jasper Exp $ */
+/* $OpenBSD: com.c,v 1.119 2008/01/08 00:29:36 dlg Exp $ */
/* $NetBSD: com.c,v 1.82.4.1 1996/06/02 09:08:00 mrg Exp $ */
/*
@@ -124,6 +124,7 @@ bus_addr_t comsiraddr;
#endif
#ifdef COM_CONSOLE
int comconsfreq;
+int comconsrate;
int comconsinit;
bus_addr_t comconsaddr;
int comconsattached;
@@ -304,11 +305,15 @@ comopen(dev_t dev, int flag, int mode, struct proc *p)
tp->t_iflag = TTYDEF_IFLAG;
tp->t_oflag = TTYDEF_OFLAG;
#ifdef COM_CONSOLE
- if (ISSET(sc->sc_hwflags, COM_HW_CONSOLE))
+ if (ISSET(sc->sc_hwflags, COM_HW_CONSOLE)) {
tp->t_cflag = comconscflag;
- else
+ tp->t_ispeed = tp->t_ospeed = comconsrate;
+ } else
#endif
+ {
tp->t_cflag = TTYDEF_CFLAG;
+ tp->t_ispeed = tp->t_ospeed = comdefaultrate;
+ }
if (ISSET(sc->sc_swflags, COM_SW_CLOCAL))
SET(tp->t_cflag, CLOCAL);
if (ISSET(sc->sc_swflags, COM_SW_CRTSCTS))
@@ -316,7 +321,6 @@ comopen(dev_t dev, int flag, int mode, struct proc *p)
if (ISSET(sc->sc_swflags, COM_SW_MDMBUF))
SET(tp->t_cflag, MDMBUF);
tp->t_lflag = TTYDEF_LFLAG;
- tp->t_ispeed = tp->t_ospeed = comdefaultrate;
s = spltty();
@@ -1367,7 +1371,7 @@ comcninit(struct consdev *cp)
if (comconsfreq == 0)
comconsfreq = COM_FREQ;
- cominit(comconsiot, comconsioh, comdefaultrate, comconsfreq);
+ cominit(comconsiot, comconsioh, comconsrate, comconsfreq);
comconsinit = 0;
}
@@ -1393,6 +1397,7 @@ comcnattach(bus_space_tag_t iot, bus_addr_t iobase, int rate, int frequency, tcf
comconsaddr = iobase;
comconscflag = cflag;
comconsfreq = frequency;
+ comconsrate = rate;
return (0);
}