#endif
return dm_scan_fdt_node(gd->dm_root, blob, 0, pre_reloc_only);
}
+#else
+static int dm_scan_fdt_node(struct udevice *parent, const void *blob,
+ int offset, bool pre_reloc_only)
+{
+ return 0;
+}
#endif
+int dm_extended_scan_fdt(const void *blob, bool pre_reloc_only)
+{
+ int node, ret;
+
+ ret = dm_scan_fdt(gd->fdt_blob, pre_reloc_only);
+ if (ret) {
+ debug("dm_scan_fdt() failed: %d\n", ret);
+ return ret;
+ }
+
+ /* bind fixed-clock */
+ node = ofnode_to_offset(ofnode_path("/clocks"));
+ /* if no DT "clocks" node, no need to go further */
+ if (node < 0)
+ return ret;
+
+ ret = dm_scan_fdt_node(gd->dm_root, gd->fdt_blob, node,
+ pre_reloc_only);
+ if (ret)
+ debug("dm_scan_fdt_node() failed: %d\n", ret);
+
+ return ret;
+}
+
__weak int dm_scan_other(bool pre_reloc_only)
{
return 0;
}
if (CONFIG_IS_ENABLED(OF_CONTROL) && !CONFIG_IS_ENABLED(OF_PLATDATA)) {
- ret = dm_scan_fdt(gd->fdt_blob, pre_reloc_only);
+ ret = dm_extended_scan_fdt(gd->fdt_blob, pre_reloc_only);
if (ret) {
- debug("dm_scan_fdt() failed: %d\n", ret);
+ debug("dm_extended_scan_dt() failed: %d\n", ret);
return ret;
}
}
*/
int dm_scan_fdt(const void *blob, bool pre_reloc_only);
+/**
+ * dm_extended_scan_fdt() - Scan the device tree and bind drivers
+ *
+ * This calls dm_scna_dft() which scans the device tree and creates a driver
+ * for each node. the top-level subnodes are examined and also all sub-nodes
+ * of "clocks" node.
+ *
+ * @blob: Pointer to device tree blob
+ * @pre_reloc_only: If true, bind only drivers with the DM_FLAG_PRE_RELOC
+ * flag. If false bind all drivers.
+ * @return 0 if OK, -ve on error
+ */
+int dm_extended_scan_fdt(const void *blob, bool pre_reloc_only);
+
/**
* dm_scan_other() - Scan for other devices
*