From ac71031705cedd53570b8b0a4a6b63473f7127c3 Mon Sep 17 00:00:00 2001 From: Ahmad Fatoum Date: Mon, 28 Jun 2021 08:45:14 +0200 Subject: 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 Link: https://lore.barebox.org/20210628064517.28636-5-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer --- common/state/state.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'common') diff --git a/common/state/state.c b/common/state/state.c index 9d04eab312..469ee62d40 100644 --- a/common/state/state.c +++ b/common/state/state.c @@ -615,6 +615,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); -- cgit v1.2.3