dm: core: migrate debug() messages to use dm_warn

Prior to that, seeing the debug() messages required to enable DM_DEBUG
which defines DEBUG (and then _DEBUG) which in turn makes failing
assert() calls reset U-Boot which isn't necessarily what is desired.

Instead, let's migrate to dm_warn which is using log_debug when unset or
log_warn when set.

While at it, reword the DM_DEBUG symbol in Kconfig to explain what it
now actually does.

Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
diff --git a/drivers/core/of_extra.c b/drivers/core/of_extra.c
index a3ebe9e..bfc1e34 100644
--- a/drivers/core/of_extra.c
+++ b/drivers/core/of_extra.c
@@ -9,6 +9,7 @@
 #include <dm/of_access.h>
 #include <dm/of_extra.h>
 #include <dm/ofnode.h>
+#include <dm/util.h>
 
 int ofnode_read_fmap_entry(ofnode node, struct fmap_entry *entry)
 {
@@ -16,13 +17,13 @@
 	ofnode subnode;
 
 	if (ofnode_read_u32(node, "image-pos", &entry->offset)) {
-		debug("Node '%s' has bad/missing 'image-pos' property\n",
-		      ofnode_get_name(node));
+		dm_warn("Node '%s' has bad/missing 'image-pos' property\n",
+			ofnode_get_name(node));
 		return log_msg_ret("image-pos", -ENOENT);
 	}
 	if (ofnode_read_u32(node, "size", &entry->length)) {
-		debug("Node '%s' has bad/missing 'size' property\n",
-		      ofnode_get_name(node));
+		dm_warn("Node '%s' has bad/missing 'size' property\n",
+			ofnode_get_name(node));
 		return log_msg_ret("size", -ENOENT);
 	}
 	entry->used = ofnode_read_s32_default(node, "used", entry->length);
@@ -57,17 +58,17 @@
 	const fdt_addr_t *cell;
 	int len;
 
-	debug("%s: %s: %s\n", __func__, ofnode_get_name(node), prop_name);
+	dm_warn("%s: %s: %s\n", __func__, ofnode_get_name(node), prop_name);
 	cell = ofnode_get_property(node, prop_name, &len);
 	if (!cell || (len < sizeof(fdt_addr_t) * 2)) {
-		debug("cell=%p, len=%d\n", cell, len);
+		dm_warn("cell=%p, len=%d\n", cell, len);
 		return -1;
 	}
 
 	*basep = fdt_addr_to_cpu(*cell);
 	*sizep = fdt_size_to_cpu(cell[1]);
-	debug("%s: base=%08lx, size=%lx\n", __func__, (ulong)*basep,
-	      (ulong)*sizep);
+	dm_warn("%s: base=%08lx, size=%lx\n", __func__, (ulong)*basep,
+		(ulong)*sizep);
 
 	return 0;
 }
@@ -85,7 +86,7 @@
 	if (!ofnode_valid(config_node)) {
 		config_node = ofnode_path("/config");
 		if (!ofnode_valid(config_node)) {
-			debug("%s: Cannot find /config node\n", __func__);
+			dm_warn("%s: Cannot find /config node\n", __func__);
 			return -ENOENT;
 		}
 	}
@@ -96,14 +97,14 @@
 		 suffix);
 	mem = ofnode_read_string(config_node, prop_name);
 	if (!mem) {
-		debug("%s: No memory type for '%s', using /memory\n", __func__,
-		      prop_name);
+		dm_warn("%s: No memory type for '%s', using /memory\n", __func__,
+			prop_name);
 		mem = "/memory";
 	}
 
 	node = ofnode_path(mem);
 	if (!ofnode_valid(node)) {
-		debug("%s: Failed to find node '%s'\n", __func__, mem);
+		dm_warn("%s: Failed to find node '%s'\n", __func__, mem);
 		return -ENOENT;
 	}
 
@@ -112,8 +113,8 @@
 	 * use the first
 	 */
 	if (ofnode_decode_region(node, "reg", &base, &size)) {
-		debug("%s: Failed to decode memory region %s\n", __func__,
-		      mem);
+		dm_warn("%s: Failed to decode memory region %s\n", __func__,
+			mem);
 		return -EINVAL;
 	}
 
@@ -121,8 +122,8 @@
 		 suffix);
 	if (ofnode_decode_region(config_node, prop_name, &offset,
 				 &offset_size)) {
-		debug("%s: Failed to decode memory region '%s'\n", __func__,
-		      prop_name);
+		dm_warn("%s: Failed to decode memory region '%s'\n", __func__,
+			prop_name);
 		return -EINVAL;
 	}