summaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
authorAhmad Fatoum <a.fatoum@pengutronix.de>2021-06-28 08:45:14 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2021-07-18 07:14:12 +0200
commitac71031705cedd53570b8b0a4a6b63473f7127c3 (patch)
tree541c2517053b4e49cf339f7e7e28dfdca17f86c1 /common
parent9c88d8beb30df68a4fc84710de62f07486df30b8 (diff)
downloadbarebox-ac71031705cedd53570b8b0a4a6b63473f7127c3.tar.gz
barebox-ac71031705cedd53570b8b0a4a6b63473f7127c3.tar.xz
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>
Diffstat (limited to 'common')
-rw-r--r--common/state/state.c4
1 files changed, 4 insertions, 0 deletions
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);