summaryrefslogtreecommitdiffstats
path: root/sys/dev/uart/uart_bus_ebus.c
diff options
context:
space:
mode:
authormarcel <marcel@FreeBSD.org>2004-04-03 23:02:02 +0000
committermarcel <marcel@FreeBSD.org>2004-04-03 23:02:02 +0000
commit73bd4f76df4a97f43778a9b501c2d26b08643aa7 (patch)
tree78acaf71ab296aafbf3f2c03dfecc2254b40f5b6 /sys/dev/uart/uart_bus_ebus.c
parent6ecbf96a8e71719b0c9a48754757c69efe3e07d9 (diff)
downloadFreeBSD-src-73bd4f76df4a97f43778a9b501c2d26b08643aa7.zip
FreeBSD-src-73bd4f76df4a97f43778a9b501c2d26b08643aa7.tar.gz
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 <marius@alchemy.franken.de> Does not doubt the correctness of the second change: marcel
Diffstat (limited to 'sys/dev/uart/uart_bus_ebus.c')
-rw-r--r--sys/dev/uart/uart_bus_ebus.c6
1 files changed, 4 insertions, 2 deletions
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));
}
OpenPOWER on IntegriCloud