Index: sys/dev/uart/uart_cpu_fdt.c =================================================================== --- sys/dev/uart/uart_cpu_fdt.c +++ sys/dev/uart/uart_cpu_fdt.c @@ -129,6 +129,7 @@ { const char *propnames[] = {"stdout-path", "linux,stdout-path", "stdout", "stdin-path", "stdin", NULL}; + const char *propnames_dbg[] = {"debug-path", "debug", NULL}; const char **name; struct uart_class *class; phandle_t node, chosen; @@ -146,18 +147,29 @@ if (!err) return (0); - if (devtype != UART_DEV_CONSOLE) + switch (devtype) { + case UART_DEV_CONSOLE: + cp = kern_getenv("hw.fdt.console"); + break; + case UART_DEV_DBGPORT: + cp = kern_getenv("hw.fdt.debug"); + break; + default: return (ENXIO); + } /* Has the user forced a specific device node? */ - cp = kern_getenv("hw.fdt.console"); if (cp == NULL) { /* * Retrieve /chosen/std{in,out}. */ node = -1; if ((chosen = OF_finddevice("/chosen")) != -1) { - for (name = propnames; *name != NULL; name++) { + if (devtype == UART_DEV_DBGPORT) + name = propnames_dbg; + else + name = propnames; + for (; *name != NULL; name++) { if (phandle_chosen_propdev(chosen, *name, &node) == 0) break;