提交 6296ad9e 编写于 作者: S Stefan Agner 提交者: Rob Herring

of/fdt: fix aliases with baudrate in earlycon

Many boards use an alias in the stdout-path specification along
with console options after a colon (e.g. serial0:115200n8). When
using earlycon, this specification currently does not work. While
fdt_path_offset supports alias resolution, it does not remove the
console options by itself. Use the fdt_path_offset_namelen variant
and provide the length of the alias to enable aliases with console
options in the stdout-path.
Signed-off-by: NStefan Agner <stefan@agner.ch>
Signed-off-by: NRob Herring <robh@kernel.org>
上级 191b77c3
......@@ -813,8 +813,11 @@ static int __init early_init_dt_scan_chosen_serial(void)
if (!p || !l)
return -ENOENT;
/* Remove console options if present */
l = strchrnul(p, ':') - p;
/* Get the node specified by stdout-path */
offset = fdt_path_offset(fdt, p);
offset = fdt_path_offset_namelen(fdt, p, l);
if (offset < 0)
return -ENODEV;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册