mailarchive of the pengutronix oss-tools mailing list
 help / color / mirror / Atom feed
From: Michael Olbrich <m.olbrich@pengutronix.de>
To: oss-tools@pengutronix.de
Cc: Michael Olbrich <m.olbrich@pengutronix.de>
Subject: [OSS-Tools] [PATCH 1/4] state: support deep probe
Date: Mon, 24 Jan 2022 12:21:40 +0100	[thread overview]
Message-ID: <20220124112143.3016473-2-m.olbrich@pengutronix.de> (raw)
In-Reply-To: <20220124112143.3016473-1-m.olbrich@pengutronix.de>

This ports the following barebox commit:

|commit ac71031705cedd53570b8b0a4a6b63473f7127c3
|Author: Ahmad Fatoum <a.fatoum@pengutronix.de>
|Date:   Mon Jun 28 08:45:14 2021 +0200
|
|    state: support deep probe
|
|    With deep probe, drivers registered before of_populate_initcall must
|    themselves take care to ensure their dependencies had a chance to probe.
|
|    For barebox-state, this means the backend partition provider must be
|    probed. Do so by calling of_partition_ensure_probed on it.
|
|    Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
|    Link: https://lore.barebox.org/20210628064517.28636-5-a.fatoum@pengutronix.de
|    Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>

Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
---
 src/barebox-state/state.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/barebox-state/state.c b/src/barebox-state/state.c
index f528b3e19f21..363ac8a5d485 100644
--- a/src/barebox-state/state.c
+++ b/src/barebox-state/state.c
@@ -616,6 +616,10 @@ struct state *state_new_from_node(struct device_node *node, bool readonly)
 	}
 
 #ifdef __BAREBOX__
+	ret = of_partition_ensure_probed(partition_node);
+	if (ret)
+		goto out_release_state;
+
 	ret = of_find_path_by_node(partition_node, &state->backend_path, 0);
 #else
 	ret = of_get_devicepath(partition_node, &state->backend_path, &offset, &size);
-- 
2.30.2


_______________________________________________
OSS-Tools mailing list
OSS-Tools@pengutronix.de


  reply	other threads:[~2022-01-24 11:21 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-24 11:21 [OSS-Tools] [PATCH 0/4] improve barebox-state support on EFI system Michael Olbrich
2022-01-24 11:21 ` Michael Olbrich [this message]
2022-01-24 11:21 ` [OSS-Tools] [PATCH 2/4] state: implement helper to find device path from diskuuid Michael Olbrich
2022-01-24 11:21 ` [OSS-Tools] [PATCH 3/4] state: support backend-diskuuid / backend-offset Michael Olbrich
2022-01-24 11:21 ` [OSS-Tools] [PATCH 4/4] state: automatically find state.dtb in the ESP Michael Olbrich
2022-02-05 23:37 ` [OSS-Tools] [PATCH 0/4] improve barebox-state support on EFI system Roland Hieber
2022-02-06  7:22   ` Michael Olbrich

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=20220124112143.3016473-2-m.olbrich@pengutronix.de \
    --to=m.olbrich@pengutronix.de \
    --cc=oss-tools@pengutronix.de \
    /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