[PATCH 2/3] ARM: Wolfvision PF5: of_probe only once
Sascha Hauer
s.hauer at pengutronix.de
Tue Oct 1 03:47:37 PDT 2024
When overlays have been applied we have to call of_clk_init() and
of_probe() once to have the changes from the overlays take effect. We
only have to do it once though after all overlays have been applied, not
after each overlay.
Doing it after each overlay has the undesired side effect that the VOP2
will be probed right after the io-expander board has been detected. At
that time the display overlay is not yet included, so the VOP2 probes
without the display and it won't be available later.
Signed-off-by: Sascha Hauer <s.hauer at pengutronix.de>
---
common/boards/wolfvision/common.c | 13 ++++++++++---
1 file changed, 10 insertions(+), 3 deletions(-)
diff --git a/common/boards/wolfvision/common.c b/common/boards/wolfvision/common.c
index 9a56b39b01..fe3417e81f 100644
--- a/common/boards/wolfvision/common.c
+++ b/common/boards/wolfvision/common.c
@@ -48,8 +48,7 @@ int wolfvision_apply_overlay(const struct wv_overlay *overlay, char **files)
return ret;
}
- of_clk_init();
- of_probe();
+ return 1;
}
return 0;
@@ -106,6 +105,7 @@ int wolfvision_rk3568_detect_hw(const struct wv_rk3568_extension *extensions,
int num_extensions, char **overlays)
{
int i, hwid, ret;
+ bool do_of_probe = false;
ret = of_device_ensure_probed_by_alias("saradc");
if (ret)
@@ -130,12 +130,19 @@ int wolfvision_rk3568_detect_hw(const struct wv_rk3568_extension *extensions,
if (overlay->name) {
pr_info("Detected %s %s\n", overlay->name,
extension->name);
- wolfvision_apply_overlay(overlay, overlays);
+ ret = wolfvision_apply_overlay(overlay, overlays);
+ if (ret > 0)
+ do_of_probe = true;
} else {
pr_warning("Detected unknown %s HWID %d\n",
extension->name, hwid);
}
}
+ if (do_of_probe) {
+ of_clk_init();
+ of_probe();
+ }
+
return 0;
}
--
2.39.5
More information about the barebox
mailing list