summaryrefslogtreecommitdiffstats
path: root/sys/dev/uart/uart_cpu_sparc64.c
diff options
context:
space:
mode:
authortmm <tmm@FreeBSD.org>2003-09-12 20:13:23 +0000
committertmm <tmm@FreeBSD.org>2003-09-12 20:13:23 +0000
commit04757808b324dc00042d3cb9befb0562cbcb3aeb (patch)
treef0cdabd8d8e070913c7bcd8dcc68a2670ee9115f /sys/dev/uart/uart_cpu_sparc64.c
parent24c1671549dd4531bba107848a5bcc0044520d93 (diff)
downloadFreeBSD-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
Diffstat (limited to 'sys/dev/uart/uart_cpu_sparc64.c')
-rw-r--r--sys/dev/uart/uart_cpu_sparc64.c7
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);
OpenPOWER on IntegriCloud