mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Michael Olbrich <m.olbrich@pengutronix.de>
To: barebox@lists.infradead.org
Cc: Michael Olbrich <m.olbrich@pengutronix.de>
Subject: [PATCH] efi: probe devices from the device-tree
Date: Mon,  7 Feb 2022 11:59:35 +0100	[thread overview]
Message-ID: <20220207105935.2920216-1-m.olbrich@pengutronix.de> (raw)
In-Reply-To: <20220207094953.949868-8-s.hauer@pengutronix.de>

The state device-tree may contain devices. For example block devices with a
'barebox,storage-by-uuid' compatible. Probing is necessary to ensure that
those devices are available.

Call barebox_register_of() instead of of_set_root_node(). It probes the
devices after setting the root node.

Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
---

I've tested the series and with this aditional patch it works on EFI, so

Tested-by: Michael Olbrich <m.olbrich@pengutronix.de>

Michael

 common/efi/payload/init.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/common/efi/payload/init.c b/common/efi/payload/init.c
index 6db6b2389540..1541683186fb 100644
--- a/common/efi/payload/init.c
+++ b/common/efi/payload/init.c
@@ -349,7 +349,9 @@ static int efi_late_init(void)
 		if (IS_ERR(root))
 			return PTR_ERR(root);
 
-		of_set_root_node(root);
+		ret = barebox_register_of(root);
+		if (ret)
+			pr_warn("Failed to register device-tree: %pe\n", ERR_PTR(ret));
 
 		np = of_find_node_by_alias(root, "state");
 
-- 
2.30.2


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox


  parent reply	other threads:[~2022-02-07 11:01 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-07  9:49 [PATCH 1/8] cdev: rename partuuid to uuid Sascha Hauer
2022-02-07  9:49 ` [PATCH 2/8] cdev: add diskuuid support Sascha Hauer
2022-02-07  9:49 ` [PATCH 3/8] rename cdev_open() -> cdev_open_name() Sascha Hauer
2022-02-07 10:43   ` Ahmad Fatoum
2022-02-07  9:49 ` [PATCH 4/8] cdev: implement cdev_open() Sascha Hauer
2022-02-07 10:46   ` Ahmad Fatoum
2022-02-07  9:49 ` [PATCH 5/8] driver: Add functions to free devices Sascha Hauer
2022-02-07  9:49 ` [PATCH 6/8] cdev: Create missing cdev_* functions Sascha Hauer
2022-02-07  9:49 ` [PATCH 7/8] cdev: create iterator for cdev list Sascha Hauer
2022-02-07  9:49 ` [PATCH 8/8] misc: Add storage-by-uuid driver Sascha Hauer
2022-02-07  9:52   ` Sascha Hauer
2022-02-07 10:59   ` Michael Olbrich [this message]
2022-02-08  9:29   ` Michael Olbrich
2022-02-08 12:27     ` Sascha Hauer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220207105935.2920216-1-m.olbrich@pengutronix.de \
    --to=m.olbrich@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox