From 079f9edfef07ff1597f3297ba4ea4ed00760abec Mon Sep 17 00:00:00 2001 From: Marius Strobl Date: Sun, 7 Aug 2005 13:37:25 +0000 Subject: [PATCH] Recognize the SAB82532 in USIII machines. --- sys/dev/puc/puc_ebus.c | 5 +++-- sys/dev/uart/uart_bus_ebus.c | 2 +- sys/dev/uart/uart_cpu_sparc64.c | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/sys/dev/puc/puc_ebus.c b/sys/dev/puc/puc_ebus.c index 1e6696ce0da9..a94576ad2071 100644 --- a/sys/dev/puc/puc_ebus.c +++ b/sys/dev/puc/puc_ebus.c @@ -48,10 +48,11 @@ __FBSDID("$FreeBSD$"); static int puc_ebus_probe(device_t dev) { - const char *nm; + const char *nm, *cmpt; nm = ofw_bus_get_name(dev); - if (!strcmp(nm, "se")) { + cmpt = ofw_bus_get_compat(dev); + if (!strcmp(nm, "se") || (cmpt != NULL && !strcmp(cmpt, "sab82532"))) { device_set_desc(dev, "Siemens SAB 82532 dual channel SCC"); return (0); } diff --git a/sys/dev/uart/uart_bus_ebus.c b/sys/dev/uart/uart_bus_ebus.c index 16a4411dccda..090dc46ababd 100644 --- a/sys/dev/uart/uart_bus_ebus.c +++ b/sys/dev/uart/uart_bus_ebus.c @@ -96,7 +96,7 @@ uart_ebus_probe(device_t dev) sc->sc_class = &uart_ns8250_class; return (uart_bus_probe(dev, 0, 0, 0, 0)); } - if (!strcmp(nm, "se")) { + if (!strcmp(nm, "se") || (cmpt != NULL && !strcmp(cmpt, "sab82532"))) { sc->sc_class = &uart_sab82532_class; error = uart_bus_probe(dev, 0, 0, 0, 1); return ((error) ? error : -1); diff --git a/sys/dev/uart/uart_cpu_sparc64.c b/sys/dev/uart/uart_cpu_sparc64.c index b08e80ee86f1..bd7a4293e910 100644 --- a/sys/dev/uart/uart_cpu_sparc64.c +++ b/sys/dev/uart/uart_cpu_sparc64.c @@ -216,7 +216,7 @@ uart_cpu_getdev(int devtype, struct uart_devinfo *di) compat[0] = '\0'; di->bas.regshft = 0; di->bas.rclk = 0; - if (!strcmp(buf, "se")) { + if (!strcmp(buf, "se") || !strcmp(compat, "sab82532")) { di->ops = uart_sab82532_ops; /* SAB82532 are only known to be used for TTYs. */ if ((di->bas.chan = uart_cpu_channel(dev)) == 0)