summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormarcel <marcel@FreeBSD.org>2014-03-11 03:20:10 +0000
committermarcel <marcel@FreeBSD.org>2014-03-11 03:20:10 +0000
commitc1f6ea6bed2d6d2537e0b2ecc472732946d06aa7 (patch)
tree24e1b277207b477bdc5585a8f17df5eb43141c40
parentf9d0a84c5cf585be9fe567b22ffe70f03ef22d73 (diff)
downloadFreeBSD-src-c1f6ea6bed2d6d2537e0b2ecc472732946d06aa7.zip
FreeBSD-src-c1f6ea6bed2d6d2537e0b2ecc472732946d06aa7.tar.gz
Pass the actual baudrate to tty_init_console(). This defines the initial
baudrate of the device special file, and makes sure that on open(2) the UART is programmed with the correct baudrate. This then eliminates the need in uart_tty_param() to override the speed setting.
-rw-r--r--sys/dev/uart/uart_tty.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/dev/uart/uart_tty.c b/sys/dev/uart/uart_tty.c
index 56f879b..723a55e 100644
--- a/sys/dev/uart/uart_tty.c
+++ b/sys/dev/uart/uart_tty.c
@@ -386,7 +386,7 @@ uart_tty_attach(struct uart_softc *sc)
if (sc->sc_sysdev != NULL && sc->sc_sysdev->type == UART_DEV_CONSOLE) {
sprintf(((struct consdev *)sc->sc_sysdev->cookie)->cn_name,
"ttyu%r", unit);
- tty_init_console(tp, 0);
+ tty_init_console(tp, sc->sc_sysdev->baudrate);
}
swi_add(&tty_intr_event, uart_driver_name, uart_tty_intr, sc, SWI_TTY,
OpenPOWER on IntegriCloud