mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH master] boards: qemu-virt: rescan aliases after merging DT fragment
@ 2023-09-11 16:22 Ahmad Fatoum
  2023-09-12  8:46 ` Sascha Hauer
  0 siblings, 1 reply; 2+ messages in thread
From: Ahmad Fatoum @ 2023-09-11 16:22 UTC (permalink / raw)
  To: barebox; +Cc: Ahmad Fatoum

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>
---
 common/boards/qemu-virt/board.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/common/boards/qemu-virt/board.c b/common/boards/qemu-virt/board.c
index b9df129834d9..4f2f7374c56a 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;
-- 
2.39.2




^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH master] boards: qemu-virt: rescan aliases after merging DT fragment
  2023-09-11 16:22 [PATCH master] boards: qemu-virt: rescan aliases after merging DT fragment Ahmad Fatoum
@ 2023-09-12  8:46 ` Sascha Hauer
  0 siblings, 0 replies; 2+ messages in thread
From: Sascha Hauer @ 2023-09-12  8:46 UTC (permalink / raw)
  To: Ahmad Fatoum; +Cc: barebox

On Mon, Sep 11, 2023 at 06:22:37PM +0200, Ahmad Fatoum wrote:
> 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>
> ---
>  common/boards/qemu-virt/board.c | 3 +++
>  1 file changed, 3 insertions(+)

Applied, thanks

Sascha


-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-09-12  8:47 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-09-11 16:22 [PATCH master] boards: qemu-virt: rescan aliases after merging DT fragment Ahmad Fatoum
2023-09-12  8:46 ` Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox