Page MenuHomeFreeBSD

D5986.id17424.diff
No OneTemporary

D5986.id17424.diff

Index: sys/dev/uart/uart_cpu_fdt.c
===================================================================
--- sys/dev/uart/uart_cpu_fdt.c
+++ sys/dev/uart/uart_cpu_fdt.c
@@ -122,6 +122,7 @@
{
const char *propnames[] = {"stdout-path", "linux,stdout-path", "stdout",
"stdin-path", "stdin", NULL};
+ const char *propname_dbg[] = "{"freebsd,debug-path", NULL};
const char **name;
struct uart_class *class;
phandle_t node, chosen;
@@ -135,8 +136,16 @@
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");
@@ -146,7 +155,11 @@
*/
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;

File Metadata

Mime Type
text/plain
Expires
Mon, May 18, 6:17 AM (7 h, 49 s)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
33235864
Default Alt Text
D5986.id17424.diff (1 KB)

Event Timeline