[PATCH 4/7] state: support deep probe
Ahmad Fatoum
a.fatoum at pengutronix.de
Sun Jun 27 23:45:14 PDT 2021
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 at pengutronix.de>
---
common/state/state.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/common/state/state.c b/common/state/state.c
index 9d04eab312eb..469ee62d4012 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);
--
2.30.2
More information about the barebox
mailing list