Date: Sat, 5 Jul 2008 18:05:29 GMT From: Marcel Moolenaar <marcel@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 144729 for review Message-ID: <200807051805.m65I5T4Y056554@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=144729 Change 144729 by marcel@marcel_xcllnt on 2008/07/05 18:05:19 Declare uart_i8251_class. Since it's weak, we don't actually have to have a definition for it. Eliminate #ifdef notyet around references to uart_i8251_class. Affected files ... .. //depot/projects/uart/dev/uart/uart.h#15 edit .. //depot/projects/uart/dev/uart/uart_bus_cbus.c#2 edit .. //depot/projects/uart/dev/uart/uart_cpu_pc98.c#17 edit Differences ... ==== //depot/projects/uart/dev/uart/uart.h#15 (text+ko) ==== @@ -64,6 +64,7 @@ */ struct uart_class; +extern struct uart_class uart_i8251_class __attribute__((weak)); extern struct uart_class uart_ns8250_class __attribute__((weak)); extern struct uart_class uart_quicc_class __attribute__((weak)); extern struct uart_class uart_sab82532_class __attribute__((weak)); ==== //depot/projects/uart/dev/uart/uart_bus_cbus.c#2 (text+ko) ==== @@ -62,9 +62,7 @@ bus_addr_t iobase; struct uart_class *class; } uart_cbus_devs[] = { -#ifdef notyet { 0x30, &uart_i8251_class }, -#endif { 0x238, &uart_ns8250_class }, { 0, NULL } }; @@ -103,9 +101,7 @@ logical_id = isa_get_logicalid(dev); switch (logical_id) { case 0x0100e4a5: /* RSA-98III */ -#ifdef notyet sc->sc_class = &uart_rsa_class; -#endif break; case 0x4180a3b8: /* PC-9821CB-B04 */ case 0x0181a3b8: /* PC-9821CB2-B04 */ @@ -134,6 +130,9 @@ } } + if (sc->sc_class == NULL) + return (ENXIO); + return (uart_bus_probe(dev, 0, 0, 0, 0)); } ==== //depot/projects/uart/dev/uart/uart_cpu_pc98.c#17 (text+ko) ==== @@ -41,9 +41,7 @@ bus_addr_t iobase; struct uart_class *class; } uart_cbus_devs[] = { -#ifdef notyet { 0x30, &uart_i8251_class }, -#endif { 0x238, &uart_ns8250_class }, { 0, NULL } }; @@ -67,9 +65,7 @@ struct uart_class *class; unsigned int i, j, ivar; - class = &uart_ns8250_class; /* currently ns8250 only */ - if (class == NULL) - return (ENXIO); + class = &uart_i8251_class; /* Check the environment. */ if (uart_getenv(devtype, di, class) == 0)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200807051805.m65I5T4Y056554>