summaryrefslogtreecommitdiffstats
path: root/common/boards/qemu-virt/board.c
diff options
context:
space:
mode:
authorAhmad Fatoum <a.fatoum@pengutronix.de>2023-09-11 18:22:37 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2023-09-12 10:46:21 +0200
commit4b17ad98eb9655082962fa65dea6840a001c3a1c (patch)
treeaae4bdbfd71b42d8744125d7e703584f816dc9e1 /common/boards/qemu-virt/board.c
parent451c25b60eacfa8d4bc162f975fc47ea4d289d2b (diff)
downloadbarebox-4b17ad98eb9655082962fa65dea6840a001c3a1c.tar.gz
barebox-4b17ad98eb9655082962fa65dea6840a001c3a1c.tar.xz
boards: qemu-virt: rescan aliases after merging DT fragment
barebox now compiles an initially empty device tree that's combined with the device tree passed by Qemu. That device tree can hold the FIT public key or if CONFIG_EXTERNAL_DTS_FRAGMENTS is enabled, device tree nodes passed at build time. If this device tree fragment adds an alias, it won't be registered, which can be surprising. Therefore call of_alias_scan after merging the device trees. Fixes: 484a0d281408 ("boards: qemu-virt: support passing in FIT public key") Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.barebox.org/20230911162237.3797218-1-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'common/boards/qemu-virt/board.c')
-rw-r--r--common/boards/qemu-virt/board.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/common/boards/qemu-virt/board.c b/common/boards/qemu-virt/board.c
index b9df129834..4f2f7374c5 100644
--- a/common/boards/qemu-virt/board.c
+++ b/common/boards/qemu-virt/board.c
@@ -80,6 +80,9 @@ static int virt_board_driver_init(void)
pubkey = of_unflatten_dtb(__dtb_fitimage_pubkey_start, INT_MAX);
of_merge_nodes(root, pubkey);
+ /* fragment may have added aliases to the DT */
+ of_alias_scan();
+
/* of_probe() will happen later at of_populate_initcall */
return 0;