diff options
-rw-r--r-- | sys/arch/sparc64/dev/com_ebus.c | 8 | ||||
-rw-r--r-- | sys/dev/ic/com.c | 15 |
2 files changed, 16 insertions, 7 deletions
diff --git a/sys/arch/sparc64/dev/com_ebus.c b/sys/arch/sparc64/dev/com_ebus.c index edf008c990c..fc5483f9e5a 100644 --- a/sys/arch/sparc64/dev/com_ebus.c +++ b/sys/arch/sparc64/dev/com_ebus.c @@ -1,4 +1,4 @@ -/* $OpenBSD: com_ebus.c,v 1.13 2007/11/15 20:39:45 kettenis Exp $ */ +/* $OpenBSD: com_ebus.c,v 1.14 2008/01/08 00:29:36 dlg Exp $ */ /* $NetBSD: com_ebus.c,v 1.6 2001/07/24 19:27:10 eeh Exp $ */ /* @@ -153,11 +153,15 @@ com_ebus_attach(parent, self, aux) if (com_is_input || com_is_output) { struct consdev *cn_orig; + int speed = 9600; + + if (strcmp(ea->ea_name, "rsc-console") == 0) + speed = 115200; comconsioh = sc->sc_ioh; cn_orig = cn_tab; /* Attach com as the console. */ - if (comcnattach(sc->sc_iot, sc->sc_iobase, 9600, + if (comcnattach(sc->sc_iot, sc->sc_iobase, speed, sc->sc_frequency, ((TTYDEF_CFLAG & ~(CSIZE | PARENB))|CREAD | CS8 | HUPCL))) { printf("Error: comcnattach failed\n"); 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); } |