+#if CONFIG_IS_ENABLED(OF_LIVE)
+static int dm_scan_fdt_live(struct udevice *parent,
+ const struct device_node *node_parent,
+ bool pre_reloc_only)
+{
+ struct device_node *np;
+ int ret = 0, err;
+
+ for (np = node_parent->child; np; np = np->sibling) {
+ /* "chosen" node isn't a device itself but may contain some: */
+ if (!strcmp(np->name, "chosen")) {
+ pr_debug("parsing subnodes of \"chosen\"\n");
+
+ err = dm_scan_fdt_live(parent, np, pre_reloc_only);
+ if (err && !ret)
+ ret = err;
+ continue;
+ }
+
+ if (!of_device_is_available(np)) {
+ pr_debug(" - ignoring disabled device\n");
+ continue;
+ }
+ err = lists_bind_fdt(parent, np_to_ofnode(np), NULL,
+ pre_reloc_only);
+ if (err && !ret) {
+ ret = err;
+ debug("%s: ret=%d\n", np->name, ret);
+ }
+ }
+
+ if (ret)
+ dm_warn("Some drivers failed to bind\n");
+
+ return ret;
+}
+#endif /* CONFIG_IS_ENABLED(OF_LIVE) */
+