Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F105768152
D3559.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D3559.diff
View Options
Index: head/sys/dev/uart/uart_cpu_fdt.c
===================================================================
--- head/sys/dev/uart/uart_cpu_fdt.c
+++ head/sys/dev/uart/uart_cpu_fdt.c
@@ -134,6 +134,7 @@
phandle_t node, chosen;
pcell_t shift, br, rclk;
u_long start, size, pbase, psize;
+ char *cp;
int err;
uart_bus_space_mem = fdtbus_bs_tag;
@@ -148,18 +149,25 @@
if (devtype != UART_DEV_CONSOLE)
return (ENXIO);
- /*
- * Retrieve /chosen/std{in,out}.
- */
- node = -1;
- if ((chosen = OF_finddevice("/chosen")) != -1) {
- for (name = propnames; *name != NULL; name++) {
- if (phandle_chosen_propdev(chosen, *name, &node) == 0)
- break;
+ /* 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 (phandle_chosen_propdev(chosen, *name,
+ &node) == 0)
+ break;
+ }
}
+ if (chosen == -1 || *name == NULL)
+ node = OF_finddevice("serial0"); /* Last ditch */
+ } else {
+ node = OF_finddevice(cp);
}
- if (chosen == -1 || *name == NULL)
- node = OF_finddevice("serial0"); /* Last ditch */
if (node == -1) /* Can't find anything */
return (ENXIO);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Dec 21, 10:21 AM (14 h, 13 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
15540365
Default Alt Text
D3559.diff (1 KB)
Attached To
Mode
D3559: Allow the FDT uart driver to select witch device node to use
Attached
Detach File
Event Timeline
Log In to Comment