File tree 1 file changed +10
-14
lines changed
1 file changed +10
-14
lines changed Original file line number Diff line number Diff line change @@ -31,28 +31,24 @@ static const unsigned long baudrate_table[] = CFG_SYS_BAUDRATE_TABLE;
31
31
static int serial_check_stdout (const void * blob , struct udevice * * devp )
32
32
{
33
33
int node = -1 ;
34
- const char * str , * p , * name ;
34
+ const char * str , * p ;
35
35
int namelen ;
36
36
37
37
/* Check for a chosen console */
38
38
str = fdtdec_get_chosen_prop (blob , "stdout-path" );
39
39
if (str ) {
40
40
p = strchr (str , ':' );
41
41
namelen = p ? p - str : strlen (str );
42
+ /*
43
+ * This also deals with things like
44
+ *
45
+ * stdout-path = "serial0:115200n8";
46
+ *
47
+ * since fdt_path_offset_namelen() treats a str not
48
+ * beginning with '/' as an alias and thus applies
49
+ * fdt_get_alias_namelen() to it.
50
+ */
42
51
node = fdt_path_offset_namelen (blob , str , namelen );
43
-
44
- if (node < 0 ) {
45
- /*
46
- * Deal with things like
47
- * stdout-path = "serial0:115200n8";
48
- *
49
- * We need to look up the alias and then follow it to
50
- * the correct node.
51
- */
52
- name = fdt_get_alias_namelen (blob , str , namelen );
53
- if (name )
54
- node = fdt_path_offset (blob , name );
55
- }
56
52
}
57
53
58
54
if (node < 0 )
You can’t perform that action at this time.
0 commit comments