From 73bd4f76df4a97f43778a9b501c2d26b08643aa7 Mon Sep 17 00:00:00 2001 From: marcel Date: Sat, 3 Apr 2004 23:02:02 +0000 Subject: In uart_ebus_probe(), match "su_pnp" besides "su" for ns8250 family of UARTs. We already did this in uart_cpu_getdev(). While here, also check the compat name for "su" or "su16550". Both changes submitted by: Marius Strobl Does not doubt the correctness of the second change: marcel --- sys/dev/uart/uart_bus_ebus.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'sys') diff --git a/sys/dev/uart/uart_bus_ebus.c b/sys/dev/uart/uart_bus_ebus.c index 9445c18..8e7520b 100644 --- a/sys/dev/uart/uart_bus_ebus.c +++ b/sys/dev/uart/uart_bus_ebus.c @@ -61,7 +61,7 @@ static driver_t uart_ebus_driver = { static int uart_ebus_probe(device_t dev) { - const char *nm; + const char *nm, *cmpt; struct uart_softc *sc; int error; @@ -69,7 +69,9 @@ uart_ebus_probe(device_t dev) sc->sc_class = NULL; nm = ebus_get_name(dev); - if (!strcmp(nm, "su")) { + cmpt = ebus_get_compat(dev); + if (!strcmp(nm, "su") || !strcmp(nm, "su_pnp") || (cmpt != NULL && + (!strcmp(cmpt, "su") || !strcmp(cmpt, "su16550")))) { sc->sc_class = &uart_ns8250_class; return (uart_bus_probe(dev, 0, 0, 0, 0)); } -- cgit v1.1