diff options
author | tmm <tmm@FreeBSD.org> | 2003-09-12 20:13:23 +0000 |
---|---|---|
committer | tmm <tmm@FreeBSD.org> | 2003-09-12 20:13:23 +0000 |
commit | 04757808b324dc00042d3cb9befb0562cbcb3aeb (patch) | |
tree | f0cdabd8d8e070913c7bcd8dcc68a2670ee9115f | |
parent | 24c1671549dd4531bba107848a5bcc0044520d93 (diff) | |
download | FreeBSD-src-04757808b324dc00042d3cb9befb0562cbcb3aeb.zip FreeBSD-src-04757808b324dc00042d3cb9befb0562cbcb3aeb.tar.gz |
When determining the device class to use for the serial console, check
the "compatible" property too in the ns8250 case. This gets the serial
console to work on Blade 100s, where the device name is just "serial".
Reviewed by: marcel
-rw-r--r-- | sys/dev/uart/uart_cpu_sparc64.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/sys/dev/uart/uart_cpu_sparc64.c b/sys/dev/uart/uart_cpu_sparc64.c index d14c68b..15591a8 100644 --- a/sys/dev/uart/uart_cpu_sparc64.c +++ b/sys/dev/uart/uart_cpu_sparc64.c @@ -75,7 +75,7 @@ uart_cpu_eqres(struct uart_bas *b1, struct uart_bas *b2) int uart_cpu_getdev(int devtype, struct uart_devinfo *di) { - char buf[32], dev[32]; + char buf[32], dev[32], compat[32]; phandle_t input, options, output; bus_addr_t addr; int baud, bits, ch, error, space, stop; @@ -124,6 +124,8 @@ uart_cpu_getdev(int devtype, struct uart_devinfo *di) /* Get the device class. */ if (OF_getprop(input, "name", buf, sizeof(buf)) == -1) return (ENXIO); + if (OF_getprop(input, "compatible", compat, sizeof(compat)) == -1) + compat[0] = '\0'; di->bas.regshft = 0; di->bas.rclk = 0; if (!strcmp(buf, "se")) { @@ -134,7 +136,8 @@ uart_cpu_getdev(int devtype, struct uart_devinfo *di) di->bas.regshft = 1; ch = uart_cpu_channel(dev); addr += 4 - 4 * ch; - } else if (!strcmp(buf, "su") || !strcmp(buf, "su_pnp")) + } else if (!strcmp(buf, "su") || !strcmp(buf, "su_pnp") || + !strcmp(compat, "su") || !strcmp(compat, "su16550")) di->ops = uart_ns8250_ops; else return (ENXIO); |