Commit 1a7422eb authored by Andre Przywara's avatar Andre Przywara
Browse files

rpi4: Add stdout-path to device tree



Some device tree users like to find a pointer to the standard serial
console in the device tree, in the "stdout-path" property of the /chosen
node.

Add the location of the Mini UART in that property, so that DT users are
happy, for instance Linux' earlycon detection.

Change-Id: I178e55016e5640de5ab0bc6e061944bd3583ea96
Signed-off-by: default avatarAndre Przywara <andre.przywara@arm.com>
parent 3903a8cd
...@@ -255,6 +255,9 @@ static void rpi4_prepare_dtb(void) ...@@ -255,6 +255,9 @@ static void rpi4_prepare_dtb(void)
gic_int_prop[2] = cpu_to_fdt32(0x0f04); // all cores, level high gic_int_prop[2] = cpu_to_fdt32(0x0f04); // all cores, level high
fdt_setprop(dtb, offs, "interrupts", gic_int_prop, 12); fdt_setprop(dtb, offs, "interrupts", gic_int_prop, 12);
offs = fdt_path_offset(dtb, "/chosen");
fdt_setprop_string(dtb, offs, "stdout-path", "serial0");
ret = fdt_pack(dtb); ret = fdt_pack(dtb);
if (ret < 0) if (ret < 0)
ERROR("Failed to pack Device Tree at %p: error %d\n", dtb, ret); ERROR("Failed to pack Device Tree at %p: error %d\n", dtb, ret);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment