PERFORCE change 37471 for review
Marcel Moolenaar
marcel at FreeBSD.org
Wed Sep 3 19:58:57 PDT 2003
http://perforce.freebsd.org/chv.cgi?CH=37471
Change 37471 by marcel at marcel_nfs on 2003/09/03 19:58:22
o Display flow control capabilities of the UART.
o Display the line settings (baudrate, parity, databits and
stopbits) for system devices.
The SAB 82532 driver (with uncommitted support for HW
flow control) now announces itself as:
:
uart0: <SAB 82532 v3.2, channel A> on puc0
uart0: RTS iflow, CTS oflow
uart0: console (9600,n,8,1)
uart1: <SAB 82532 v3.2, channel B> on puc0
uart1: RTS iflow, CTS oflow
:
Affected files ...
.. //depot/projects/uart/dev/uart/uart_core.c#26 edit
Differences ...
==== //depot/projects/uart/dev/uart/uart_core.c#26 (text+ko) ====
@@ -345,21 +345,18 @@
if (error)
goto fail;
- if (sc->sc_sysdev != NULL) {
- switch (sc->sc_sysdev->type) {
- case UART_DEV_CONSOLE:
- device_printf(dev, "console\n");
- break;
- case UART_DEV_DBGPORT:
- device_printf(dev, "debug port\n");
- break;
- case UART_DEV_KEYBOARD:
- device_printf(dev, "keyboard\n");
- break;
- default:
- device_printf(dev, "unknown system device\n");
- break;
+ if (sc->sc_hwiflow || sc->sc_hwoflow) {
+ sep = "";
+ device_print_prettyname(dev);
+ if (sc->sc_hwiflow) {
+ printf("%sRTS iflow", sep);
+ sep = ", ";
+ }
+ if (sc->sc_hwoflow) {
+ printf("%sCTS oflow", sep);
+ sep = ", ";
}
+ printf("\n");
}
if (bootverbose && (sc->sc_fastintr || sc->sc_polled)) {
@@ -376,6 +373,26 @@
printf("\n");
}
+ if (sc->sc_sysdev != NULL) {
+ switch (sc->sc_sysdev->type) {
+ case UART_DEV_CONSOLE:
+ device_printf(dev, "console");
+ break;
+ case UART_DEV_DBGPORT:
+ device_printf(dev, "debug port");
+ break;
+ case UART_DEV_KEYBOARD:
+ device_printf(dev, "keyboard");
+ break;
+ default:
+ device_printf(dev, "unknown system device");
+ break;
+ }
+ printf(" (%d,%c,%d,%d)\n", sc->sc_sysdev->baudrate,
+ "noems"[sc->sc_sysdev->parity], sc->sc_sysdev->databits,
+ sc->sc_sysdev->stopbits);
+ }
+
error = (sc->sc_sysdev != NULL && sc->sc_sysdev->attach != NULL)
? (*sc->sc_sysdev->attach)(sc) : uart_tty_attach(sc);
if (error)
More information about the p4-projects
mailing list