diff --git a/drivers/core/device.c b/drivers/core/device.c
index 18e2bd0..779f371 100644
--- a/drivers/core/device.c
+++ b/drivers/core/device.c
@@ -58,7 +58,7 @@
 
 	ret = uclass_get(drv->id, &uc);
 	if (ret) {
-		debug("Missing uclass for driver %s\n", drv->name);
+		dm_warn("Missing uclass for driver %s\n", drv->name);
 		return ret;
 	}
 
diff --git a/drivers/core/fdtaddr.c b/drivers/core/fdtaddr.c
index 6be8ea0..9e59968 100644
--- a/drivers/core/fdtaddr.c
+++ b/drivers/core/fdtaddr.c
@@ -15,6 +15,7 @@
 #include <asm/global_data.h>
 #include <asm/io.h>
 #include <dm/device-internal.h>
+#include <dm/util.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
@@ -32,19 +33,19 @@
 
 		na = fdt_address_cells(gd->fdt_blob, parent);
 		if (na < 1) {
-			debug("bad #address-cells\n");
+			dm_warn("bad #address-cells\n");
 			return FDT_ADDR_T_NONE;
 		}
 
 		ns = fdt_size_cells(gd->fdt_blob, parent);
 		if (ns < 0) {
-			debug("bad #size-cells\n");
+			dm_warn("bad #size-cells\n");
 			return FDT_ADDR_T_NONE;
 		}
 
 		reg = fdt_getprop(gd->fdt_blob, offset, "reg", &len);
 		if (!reg || (len <= (index * sizeof(fdt32_t) * (na + ns)))) {
-			debug("Req index out of range\n");
+			dm_warn("Req index out of range\n");
 			return FDT_ADDR_T_NONE;
 		}
 
diff --git a/drivers/core/lists.c b/drivers/core/lists.c
index 942fe4a..bd0ab4f 100644
--- a/drivers/core/lists.c
+++ b/drivers/core/lists.c
@@ -144,7 +144,7 @@
 
 	drv = lists_driver_lookup_name(drv_name);
 	if (!drv) {
-		debug("Cannot find driver '%s'\n", drv_name);
+		dm_warn("Cannot find driver '%s'\n", drv_name);
 		return -ENOENT;
 	}
 	ret = device_bind_with_driver_data(parent, drv, dev_name, 0 /* data */,
diff --git a/drivers/core/of_access.c b/drivers/core/of_access.c
index 41f2e09..d05be27 100644
--- a/drivers/core/of_access.c
+++ b/drivers/core/of_access.c
@@ -25,6 +25,7 @@
 #include <linux/bug.h>
 #include <linux/libfdt.h>
 #include <dm/of_access.h>
+#include <dm/util.h>
 #include <linux/ctype.h>
 #include <linux/err.h>
 #include <linux/ioport.h>
@@ -489,17 +490,17 @@
 {
 	const u8 *val;
 
-	debug("%s: %s: ", __func__, propname);
+	dm_warn("%s: %s: ", __func__, propname);
 	if (!np)
 		return -EINVAL;
 	val = of_find_property_value_of_size(np, propname, sizeof(*outp));
 	if (IS_ERR(val)) {
-		debug("(not found)\n");
+		dm_warn("(not found)\n");
 		return PTR_ERR(val);
 	}
 
 	*outp = *val;
-	debug("%#x (%d)\n", *outp, *outp);
+	dm_warn("%#x (%d)\n", *outp, *outp);
 
 	return 0;
 }
@@ -508,17 +509,17 @@
 {
 	const __be16 *val;
 
-	debug("%s: %s: ", __func__, propname);
+	dm_warn("%s: %s: ", __func__, propname);
 	if (!np)
 		return -EINVAL;
 	val = of_find_property_value_of_size(np, propname, sizeof(*outp));
 	if (IS_ERR(val)) {
-		debug("(not found)\n");
+		dm_warn("(not found)\n");
 		return PTR_ERR(val);
 	}
 
 	*outp = be16_to_cpup(val);
-	debug("%#x (%d)\n", *outp, *outp);
+	dm_warn("%#x (%d)\n", *outp, *outp);
 
 	return 0;
 }
@@ -533,14 +534,14 @@
 {
 	const __be32 *val;
 
-	debug("%s: %s: ", __func__, propname);
+	dm_warn("%s: %s: ", __func__, propname);
 	val = of_find_property_value_of_size(np, propname,
 					     sz * sizeof(*out_values));
 
 	if (IS_ERR(val))
 		return PTR_ERR(val);
 
-	debug("size %zd\n", sz);
+	dm_warn("size %zd\n", sz);
 	while (sz--)
 		*out_values++ = be32_to_cpup(val++);
 
@@ -552,19 +553,19 @@
 {
 	const __be32 *val;
 
-	debug("%s: %s: ", __func__, propname);
+	dm_warn("%s: %s: ", __func__, propname);
 	if (!np)
 		return -EINVAL;
 
 	val = of_find_property_value_of_size(np, propname,
 					     sizeof(*outp) * (index + 1));
 	if (IS_ERR(val)) {
-		debug("(not found)\n");
+		dm_warn("(not found)\n");
 		return PTR_ERR(val);
 	}
 
 	*outp = be32_to_cpup(val + index);
-	debug("%#x (%d)\n", *outp, *outp);
+	dm_warn("%#x (%d)\n", *outp, *outp);
 
 	return 0;
 }
@@ -574,20 +575,20 @@
 {
 	const __be64 *val;
 
-	debug("%s: %s: ", __func__, propname);
+	dm_warn("%s: %s: ", __func__, propname);
 	if (!np)
 		return -EINVAL;
 
 	val = of_find_property_value_of_size(np, propname,
 					     sizeof(*outp) * (index + 1));
 	if (IS_ERR(val)) {
-		debug("(not found)\n");
+		dm_warn("(not found)\n");
 		return PTR_ERR(val);
 	}
 
 	*outp = be64_to_cpup(val + index);
-	debug("%#llx (%lld)\n", (unsigned long long)*outp,
-	      (unsigned long long)*outp);
+	dm_warn("%#llx (%lld)\n", (unsigned long long)*outp,
+		(unsigned long long)*outp);
 
 	return 0;
 }
@@ -620,7 +621,7 @@
 		l = strnlen(p, end - p) + 1;
 		if (p + l > end)
 			return -EILSEQ;
-		debug("comparing %s with %s\n", string, p);
+		dm_warn("comparing %s with %s\n", string, p);
 		if (strcmp(string, p) == 0)
 			return i; /* Found it; return index */
 	}
@@ -707,17 +708,17 @@
 			if (cells_name || cur_index == index) {
 				node = of_find_node_by_phandle(NULL, phandle);
 				if (!node) {
-					debug("%s: could not find phandle\n",
-					      np->full_name);
+					dm_warn("%s: could not find phandle\n",
+						np->full_name);
 					goto err;
 				}
 			}
 
 			if (cells_name) {
 				if (of_read_u32(node, cells_name, &count)) {
-					debug("%s: could not get %s for %s\n",
-					      np->full_name, cells_name,
-					      node->full_name);
+					dm_warn("%s: could not get %s for %s\n",
+						np->full_name, cells_name,
+						node->full_name);
 					goto err;
 				}
 			} else {
@@ -729,8 +730,8 @@
 			 * remaining property data length
 			 */
 			if (list + count > list_end) {
-				debug("%s: arguments longer than property\n",
-				      np->full_name);
+				dm_warn("%s: arguments longer than property\n",
+					np->full_name);
 				goto err;
 			}
 		}
@@ -825,8 +826,8 @@
 	strncpy(ap->stem, stem, stem_len);
 	ap->stem[stem_len] = 0;
 	list_add_tail(&ap->link, &aliases_lookup);
-	debug("adding DT alias:%s: stem=%s id=%i node=%s\n",
-	      ap->alias, ap->stem, ap->id, of_node_full_name(np));
+	dm_warn("adding DT alias:%s: stem=%s id=%i node=%s\n",
+		ap->alias, ap->stem, ap->id, of_node_full_name(np));
 }
 
 int of_alias_scan(void)
diff --git a/drivers/core/of_addr.c b/drivers/core/of_addr.c
index d7913ab..c893447 100644
--- a/drivers/core/of_addr.c
+++ b/drivers/core/of_addr.c
@@ -11,6 +11,7 @@
 #include <linux/libfdt.h>
 #include <dm/of_access.h>
 #include <dm/of_addr.h>
+#include <dm/util.h>
 #include <linux/err.h>
 #include <linux/ioport.h>
 #include <linux/printk.h>
@@ -26,7 +27,7 @@
 #ifdef DEBUG
 static void of_dump_addr(const char *s, const __be32 *addr, int na)
 {
-	debug("%s", s);
+	dm_warn("%s", s);
 	while (na--)
 		pr_cont(" %08x", be32_to_cpu(*(addr++)));
 	pr_cont("\n");
@@ -65,9 +66,9 @@
 	s  = of_read_number(range + na + pna, ns);
 	da = of_read_number(addr, na);
 
-	debug("default map, cp=%llx, s=%llx, da=%llx\n",
-	      (unsigned long long)cp, (unsigned long long)s,
-	      (unsigned long long)da);
+	dm_warn("default map, cp=%llx, s=%llx, da=%llx\n",
+		(unsigned long long)cp, (unsigned long long)s,
+		(unsigned long long)da);
 
 	if (da < cp || da >= (cp + s))
 		return OF_BAD_ADDR;
@@ -193,17 +194,17 @@
 	ranges = of_get_property(parent, rprop, &rlen);
 	if (ranges == NULL && !of_empty_ranges_quirk(parent) &&
 	    strcmp(rprop, "dma-ranges")) {
-		debug("no ranges; cannot translate\n");
+		dm_warn("no ranges; cannot translate\n");
 		return 1;
 	}
 	if (ranges == NULL || rlen == 0) {
 		offset = of_read_number(addr, na);
 		memset(addr, 0, pna * 4);
-		debug("empty ranges; 1:1 translation\n");
+		dm_warn("empty ranges; 1:1 translation\n");
 		goto finish;
 	}
 
-	debug("walking ranges...\n");
+	dm_warn("walking ranges...\n");
 
 	/* Now walk through the ranges */
 	rlen /= 4;
@@ -214,14 +215,14 @@
 			break;
 	}
 	if (offset == OF_BAD_ADDR) {
-		debug("not found !\n");
+		dm_warn("not found !\n");
 		return 1;
 	}
 	memcpy(addr, ranges + na, 4 * pna);
 
  finish:
 	of_dump_addr("parent translation for:", addr, pna);
-	debug("with offset: %llx\n", (unsigned long long)offset);
+	dm_warn("with offset: %llx\n", (unsigned long long)offset);
 
 	/* Translate it into parent bus space */
 	return pbus->translate(addr, offset, pna);
@@ -246,7 +247,7 @@
 	int na, ns, pna, pns;
 	u64 result = OF_BAD_ADDR;
 
-	debug("** translation for device %s **\n", of_node_full_name(dev));
+	dm_warn("** translation for device %s **\n", of_node_full_name(dev));
 
 	/* Increase refcount at current level */
 	(void)of_node_get(dev);
@@ -260,13 +261,13 @@
 	/* Count address cells & copy address locally */
 	bus->count_cells(dev, &na, &ns);
 	if (!OF_CHECK_COUNTS(na, ns)) {
-		debug("Bad cell count for %s\n", of_node_full_name(dev));
+		dm_warn("Bad cell count for %s\n", of_node_full_name(dev));
 		goto bail;
 	}
 	memcpy(addr, in_addr, na * 4);
 
-	debug("bus is %s (na=%d, ns=%d) on %s\n", bus->name, na, ns,
-	      of_node_full_name(parent));
+	dm_warn("bus is %s (na=%d, ns=%d) on %s\n", bus->name, na, ns,
+		of_node_full_name(parent));
 	of_dump_addr("translating address:", addr, na);
 
 	/* Translate */
@@ -278,7 +279,7 @@
 
 		/* If root, we have finished */
 		if (parent == NULL) {
-			debug("reached root node\n");
+			dm_warn("reached root node\n");
 			result = of_read_number(addr, na);
 			break;
 		}
@@ -287,13 +288,13 @@
 		pbus = of_match_bus(parent);
 		pbus->count_cells(dev, &pna, &pns);
 		if (!OF_CHECK_COUNTS(pna, pns)) {
-			debug("Bad cell count for %s\n",
-			      of_node_full_name(dev));
+			dm_warn("Bad cell count for %s\n",
+				of_node_full_name(dev));
 			break;
 		}
 
-		debug("parent bus is %s (na=%d, ns=%d) on %s\n", pbus->name,
-		      pna, pns, of_node_full_name(parent));
+		dm_warn("parent bus is %s (na=%d, ns=%d) on %s\n", pbus->name,
+			pna, pns, of_node_full_name(parent));
 
 		/* Apply bus translation */
 		if (of_translate_one(dev, bus, pbus, addr, na, ns, pna, rprop))
@@ -358,8 +359,8 @@
 	}
 
 	if (!dev || !ranges) {
-		debug("no dma-ranges found for node %s\n",
-		      of_node_full_name(dev));
+		dm_warn("no dma-ranges found for node %s\n",
+			of_node_full_name(dev));
 		ret = -ENOENT;
 		goto out;
 	}
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;
 	}
 
diff --git a/drivers/core/ofnode.c b/drivers/core/ofnode.c
index 9ff4646..4d563b4 100644
--- a/drivers/core/ofnode.c
+++ b/drivers/core/ofnode.c
@@ -16,6 +16,7 @@
 #include <dm/of_access.h>
 #include <dm/of_addr.h>
 #include <dm/ofnode.h>
+#include <dm/util.h>
 #include <linux/err.h>
 #include <linux/ioport.h>
 #include <asm/global_data.h>
@@ -314,7 +315,7 @@
 	int len;
 
 	assert(ofnode_valid(node));
-	debug("%s: %s: ", __func__, propname);
+	dm_warn("%s: %s: ", __func__, propname);
 
 	if (ofnode_is_np(node))
 		return of_read_u8(ofnode_to_np(node), propname, outp);
@@ -322,11 +323,11 @@
 	cell = fdt_getprop(gd->fdt_blob, ofnode_to_offset(node), propname,
 			   &len);
 	if (!cell || len < sizeof(*cell)) {
-		debug("(not found)\n");
+		dm_warn("(not found)\n");
 		return -EINVAL;
 	}
 	*outp = *cell;
-	debug("%#x (%u)\n", *outp, *outp);
+	dm_warn("%#x (%u)\n", *outp, *outp);
 
 	return 0;
 }
@@ -345,7 +346,7 @@
 	int len;
 
 	assert(ofnode_valid(node));
-	debug("%s: %s: ", __func__, propname);
+	dm_warn("%s: %s: ", __func__, propname);
 
 	if (ofnode_is_np(node))
 		return of_read_u16(ofnode_to_np(node), propname, outp);
@@ -353,11 +354,11 @@
 	cell = fdt_getprop(gd->fdt_blob, ofnode_to_offset(node), propname,
 			   &len);
 	if (!cell || len < sizeof(*cell)) {
-		debug("(not found)\n");
+		dm_warn("(not found)\n");
 		return -EINVAL;
 	}
 	*outp = be16_to_cpup(cell);
-	debug("%#x (%u)\n", *outp, *outp);
+	dm_warn("%#x (%u)\n", *outp, *outp);
 
 	return 0;
 }
@@ -390,7 +391,7 @@
 	int len;
 
 	assert(ofnode_valid(node));
-	debug("%s: %s: ", __func__, propname);
+	dm_warn("%s: %s: ", __func__, propname);
 
 	if (ofnode_is_np(node))
 		return of_read_u32_index(ofnode_to_np(node), propname, index,
@@ -399,17 +400,17 @@
 	cell = fdt_getprop(ofnode_to_fdt(node), ofnode_to_offset(node),
 			   propname, &len);
 	if (!cell) {
-		debug("(not found)\n");
+		dm_warn("(not found)\n");
 		return -EINVAL;
 	}
 
 	if (len < (sizeof(int) * (index + 1))) {
-		debug("(not large enough)\n");
+		dm_warn("(not large enough)\n");
 		return -EOVERFLOW;
 	}
 
 	*outp = fdt32_to_cpu(cell[index]);
-	debug("%#x (%u)\n", *outp, *outp);
+	dm_warn("%#x (%u)\n", *outp, *outp);
 
 	return 0;
 }
@@ -429,17 +430,17 @@
 	cell = fdt_getprop(ofnode_to_fdt(node), ofnode_to_offset(node),
 			   propname, &len);
 	if (!cell) {
-		debug("(not found)\n");
+		dm_warn("(not found)\n");
 		return -EINVAL;
 	}
 
 	if (len < (sizeof(u64) * (index + 1))) {
-		debug("(not large enough)\n");
+		dm_warn("(not large enough)\n");
 		return -EOVERFLOW;
 	}
 
 	*outp = fdt64_to_cpu(cell[index]);
-	debug("%#llx (%llu)\n", *outp, *outp);
+	dm_warn("%#llx (%llu)\n", *outp, *outp);
 
 	return 0;
 }
@@ -467,7 +468,7 @@
 	int len;
 
 	assert(ofnode_valid(node));
-	debug("%s: %s: ", __func__, propname);
+	dm_warn("%s: %s: ", __func__, propname);
 
 	if (ofnode_is_np(node))
 		return of_read_u64(ofnode_to_np(node), propname, outp);
@@ -475,12 +476,12 @@
 	cell = fdt_getprop(ofnode_to_fdt(node), ofnode_to_offset(node),
 			   propname, &len);
 	if (!cell || len < sizeof(*cell)) {
-		debug("(not found)\n");
+		dm_warn("(not found)\n");
 		return -EINVAL;
 	}
 	*outp = fdt64_to_cpu(cell[0]);
-	debug("%#llx (%llu)\n", (unsigned long long)*outp,
-	      (unsigned long long)*outp);
+	dm_warn("%#llx (%llu)\n", (unsigned long long)*outp,
+		(unsigned long long)*outp);
 
 	return 0;
 }
@@ -498,11 +499,11 @@
 	bool prop;
 
 	assert(ofnode_valid(node));
-	debug("%s: %s: ", __func__, propname);
+	dm_warn("%s: %s: ", __func__, propname);
 
 	prop = ofnode_has_property(node, propname);
 
-	debug("%s\n", prop ? "true" : "false");
+	dm_warn("%s\n", prop ? "true" : "false");
 
 	return prop ? true : false;
 }
@@ -513,7 +514,7 @@
 	int len;
 
 	assert(ofnode_valid(node));
-	debug("%s: %s: ", __func__, propname);
+	dm_warn("%s: %s: ", __func__, propname);
 
 	if (ofnode_is_np(node)) {
 		struct property *prop = of_find_property(
@@ -528,7 +529,7 @@
 				  propname, &len);
 	}
 	if (!val) {
-		debug("<not found>\n");
+		dm_warn("<not found>\n");
 		if (sizep)
 			*sizep = -FDT_ERR_NOTFOUND;
 		return NULL;
@@ -549,10 +550,10 @@
 		return NULL;
 
 	if (strnlen(str, len) >= len) {
-		debug("<invalid>\n");
+		dm_warn("<invalid>\n");
 		return NULL;
 	}
-	debug("%s\n", str);
+	dm_warn("%s\n", str);
 
 	return str;
 }
@@ -572,7 +573,7 @@
 	ofnode subnode;
 
 	assert(ofnode_valid(node));
-	debug("%s: %s: ", __func__, subnode_name);
+	dm_warn("%s: %s: ", __func__, subnode_name);
 
 	if (ofnode_is_np(node)) {
 		struct device_node *np = ofnode_to_np(node);
@@ -587,8 +588,8 @@
 				ofnode_to_offset(node), subnode_name);
 		subnode = noffset_to_ofnode(node, ooffset);
 	}
-	debug("%s\n", ofnode_valid(subnode) ?
-	      ofnode_get_name(subnode) : "<none>");
+	dm_warn("%s\n", ofnode_valid(subnode) ?
+		ofnode_get_name(subnode) : "<none>");
 
 	return subnode;
 }
@@ -597,7 +598,7 @@
 			  u32 *out_values, size_t sz)
 {
 	assert(ofnode_valid(node));
-	debug("%s: %s: ", __func__, propname);
+	dm_warn("%s: %s: ", __func__, propname);
 
 	if (ofnode_is_np(node)) {
 		return of_read_u32_array(ofnode_to_np(node), propname,
@@ -669,7 +670,7 @@
 const char *ofnode_get_name(ofnode node)
 {
 	if (!ofnode_valid(node)) {
-		debug("%s node not valid\n", __func__);
+		dm_warn("%s node not valid\n", __func__);
 		return NULL;
 	}
 
@@ -1030,7 +1031,7 @@
 	if (!prop)
 		return ofnode_null();
 
-	debug("%s: node_path: %s\n", __func__, prop);
+	dm_warn("%s: node_path: %s\n", __func__, prop);
 
 	return ofnode_path(prop);
 }
@@ -1053,8 +1054,8 @@
 
 	length = ofnode_read_size(node, name);
 	if (length < 0) {
-		debug("%s: could not find property %s\n",
-		      ofnode_get_name(node), name);
+		dm_warn("%s: could not find property %s\n",
+			ofnode_get_name(node), name);
 		return length;
 	}
 
@@ -1299,7 +1300,7 @@
 	int len;
 	int ret = -ENOENT;
 
-	debug("%s: %s: ", __func__, propname);
+	dm_warn("%s: %s: ", __func__, propname);
 
 	/*
 	 * If we follow the pci bus bindings strictly, we should check
@@ -1316,8 +1317,8 @@
 		int i;
 
 		for (i = 0; i < num; i++) {
-			debug("pci address #%d: %08lx %08lx %08lx\n", i,
-			      (ulong)fdt32_to_cpu(cell[0]),
+			dm_warn("pci address #%d: %08lx %08lx %08lx\n", i,
+				(ulong)fdt32_to_cpu(cell[0]),
 			      (ulong)fdt32_to_cpu(cell[1]),
 			      (ulong)fdt32_to_cpu(cell[2]));
 			if ((fdt32_to_cpu(*cell) & type) == type) {
@@ -1346,7 +1347,7 @@
 	ret = -EINVAL;
 
 fail:
-	debug("(not found)\n");
+	dm_warn("(not found)\n");
 	return ret;
 }
 
@@ -1630,7 +1631,7 @@
 {
 	assert(ofnode_valid(node));
 
-	debug("%s: %s = %s", __func__, propname, value);
+	dm_warn("%s: %s = %s", __func__, propname, value);
 
 	return ofnode_write_prop(node, propname, value, strlen(value) + 1,
 				 false);
@@ -1743,7 +1744,7 @@
 
 	uboot = ofnode_path("/options/u-boot");
 	if (!ofnode_valid(uboot)) {
-		debug("%s: Missing /u-boot node\n", __func__);
+		dm_warn("%s: Missing /u-boot node\n", __func__);
 		return -EINVAL;
 	}
 
@@ -1769,7 +1770,7 @@
 
 	uboot = ofnode_path("/options/u-boot");
 	if (!ofnode_valid(uboot)) {
-		debug("%s: Missing /u-boot node\n", __func__);
+		dm_warn("%s: Missing /u-boot node\n", __func__);
 		return -EINVAL;
 	}
 
@@ -1784,7 +1785,7 @@
 		return -EINVAL;
 
 	if (!bootscr_flash_size) {
-		debug("bootscr-flash-size is zero. Ignoring properties!\n");
+		dm_warn("bootscr-flash-size is zero. Ignoring properties!\n");
 		*bootscr_flash_offset = 0;
 		return -EINVAL;
 	}
@@ -1831,7 +1832,7 @@
 		if (!strcmp(mode, phy_interface_strings[i]))
 			return i;
 
-	debug("%s: Invalid PHY interface '%s'\n", __func__, mode);
+	dm_warn("%s: Invalid PHY interface '%s'\n", __func__, mode);
 
 	return PHY_INTERFACE_MODE_NA;
 }
diff --git a/drivers/core/regmap.c b/drivers/core/regmap.c
index 7ff7834..304d5b0 100644
--- a/drivers/core/regmap.c
+++ b/drivers/core/regmap.c
@@ -17,6 +17,7 @@
 #include <asm/io.h>
 #include <dm/of_addr.h>
 #include <dm/devres.h>
+#include <dm/util.h>
 #include <linux/ioport.h>
 #include <linux/compat.h>
 #include <linux/err.h>
@@ -139,8 +140,8 @@
 		ret = of_address_to_resource(ofnode_to_np(node),
 					     index, &r);
 		if (ret) {
-			debug("%s: Could not read resource of range %d (ret = %d)\n",
-			      ofnode_get_name(node), index, ret);
+			dm_warn("%s: Could not read resource of range %d (ret = %d)\n",
+				ofnode_get_name(node), index, ret);
 			return ret;
 		}
 
@@ -154,8 +155,8 @@
 							  addr_len, size_len,
 							  &sz, true);
 		if (range->start == FDT_ADDR_T_NONE) {
-			debug("%s: Could not read start of range %d\n",
-			      ofnode_get_name(node), index);
+			dm_warn("%s: Could not read start of range %d\n",
+				ofnode_get_name(node), index);
 			return -EINVAL;
 		}
 
@@ -173,15 +174,15 @@
 
 	addr_len = ofnode_read_simple_addr_cells(ofnode_get_parent(node));
 	if (addr_len < 0) {
-		debug("%s: Error while reading the addr length (ret = %d)\n",
-		      ofnode_get_name(node), addr_len);
+		dm_warn("%s: Error while reading the addr length (ret = %d)\n",
+			ofnode_get_name(node), addr_len);
 		return addr_len;
 	}
 
 	size_len = ofnode_read_simple_size_cells(ofnode_get_parent(node));
 	if (size_len < 0) {
-		debug("%s: Error while reading the size length: (ret = %d)\n",
-		      ofnode_get_name(node), size_len);
+		dm_warn("%s: Error while reading the size length: (ret = %d)\n",
+			ofnode_get_name(node), size_len);
 		return size_len;
 	}
 
@@ -250,36 +251,36 @@
 
 	addr_len = ofnode_read_simple_addr_cells(ofnode_get_parent(node));
 	if (addr_len < 0) {
-		debug("%s: Error while reading the addr length (ret = %d)\n",
-		      ofnode_get_name(node), addr_len);
+		dm_warn("%s: Error while reading the addr length (ret = %d)\n",
+			ofnode_get_name(node), addr_len);
 		return addr_len;
 	}
 
 	size_len = ofnode_read_simple_size_cells(ofnode_get_parent(node));
 	if (size_len < 0) {
-		debug("%s: Error while reading the size length: (ret = %d)\n",
-		      ofnode_get_name(node), size_len);
+		dm_warn("%s: Error while reading the size length: (ret = %d)\n",
+			ofnode_get_name(node), size_len);
 		return size_len;
 	}
 
 	both_len = addr_len + size_len;
 	if (!both_len) {
-		debug("%s: Both addr and size length are zero\n",
-		      ofnode_get_name(node));
+		dm_warn("%s: Both addr and size length are zero\n",
+			ofnode_get_name(node));
 		return -EINVAL;
 	}
 
 	len = ofnode_read_size(node, "reg");
 	if (len < 0) {
-		debug("%s: Error while reading reg size (ret = %d)\n",
-		      ofnode_get_name(node), len);
+		dm_warn("%s: Error while reading reg size (ret = %d)\n",
+			ofnode_get_name(node), len);
 		return len;
 	}
 	len /= sizeof(fdt32_t);
 	count = len / both_len;
 	if (!count) {
-		debug("%s: Not enough data in reg property\n",
-		      ofnode_get_name(node));
+		dm_warn("%s: Not enough data in reg property\n",
+			ofnode_get_name(node));
 		return -EINVAL;
 	}
 
@@ -424,8 +425,8 @@
 	void *ptr;
 
 	if (do_range_check() && range_num >= map->range_count) {
-		debug("%s: range index %d larger than range count\n",
-		      __func__, range_num);
+		dm_warn("%s: range index %d larger than range count\n",
+			__func__, range_num);
 		return -ERANGE;
 	}
 	range = &map->ranges[range_num];
@@ -433,7 +434,7 @@
 	offset <<= map->reg_offset_shift;
 	if (do_range_check() &&
 	    (offset + val_len > range->size || offset + val_len < offset)) {
-		debug("%s: offset/size combination invalid\n", __func__);
+		dm_warn("%s: offset/size combination invalid\n", __func__);
 		return -ERANGE;
 	}
 
@@ -455,7 +456,7 @@
 		break;
 #endif
 	default:
-		debug("%s: regmap size %zu unknown\n", __func__, val_len);
+		dm_warn("%s: regmap size %zu unknown\n", __func__, val_len);
 		return -EINVAL;
 	}
 
@@ -564,15 +565,15 @@
 	void *ptr;
 
 	if (range_num >= map->range_count) {
-		debug("%s: range index %d larger than range count\n",
-		      __func__, range_num);
+		dm_warn("%s: range index %d larger than range count\n",
+			__func__, range_num);
 		return -ERANGE;
 	}
 	range = &map->ranges[range_num];
 
 	offset <<= map->reg_offset_shift;
 	if (offset + val_len > range->size || offset + val_len < offset) {
-		debug("%s: offset/size combination invalid\n", __func__);
+		dm_warn("%s: offset/size combination invalid\n", __func__);
 		return -ERANGE;
 	}
 
@@ -594,7 +595,7 @@
 		break;
 #endif
 	default:
-		debug("%s: regmap size %zu unknown\n", __func__, val_len);
+		dm_warn("%s: regmap size %zu unknown\n", __func__, val_len);
 		return -EINVAL;
 	}
 
@@ -630,8 +631,8 @@
 		u.v64 = val;
 		break;
 	default:
-		debug("%s: regmap size %zu unknown\n", __func__,
-		      (size_t)map->width);
+		dm_warn("%s: regmap size %zu unknown\n", __func__,
+			(size_t)map->width);
 		return -EINVAL;
 	}
 
diff --git a/drivers/core/root.c b/drivers/core/root.c
index 4bfd08f..7cf6607 100644
--- a/drivers/core/root.c
+++ b/drivers/core/root.c
@@ -207,7 +207,7 @@
 		err = lists_bind_fdt(parent, node, NULL, NULL, pre_reloc_only);
 		if (err && !ret) {
 			ret = err;
-			debug("%s: ret=%d\n", node_name, ret);
+			dm_warn("%s: ret=%d\n", node_name, ret);
 		}
 	}
 
@@ -248,7 +248,7 @@
 
 	ret = dm_scan_fdt(pre_reloc_only);
 	if (ret) {
-		debug("dm_scan_fdt() failed: %d\n", ret);
+		dm_warn("dm_scan_fdt() failed: %d\n", ret);
 		return ret;
 	}
 
@@ -256,8 +256,8 @@
 	for (i = 0; i < ARRAY_SIZE(nodes); i++) {
 		ret = dm_scan_fdt_ofnode_path(nodes[i], pre_reloc_only);
 		if (ret) {
-			debug("dm_scan_fdt() scan for %s failed: %d\n",
-			      nodes[i], ret);
+			dm_warn("dm_scan_fdt() scan for %s failed: %d\n",
+				nodes[i], ret);
 			return ret;
 		}
 	}
@@ -320,14 +320,14 @@
 
 	ret = dm_scan_plat(pre_reloc_only);
 	if (ret) {
-		debug("dm_scan_plat() failed: %d\n", ret);
+		dm_warn("dm_scan_plat() failed: %d\n", ret);
 		return ret;
 	}
 
 	if (CONFIG_IS_ENABLED(OF_REAL)) {
 		ret = dm_extended_scan(pre_reloc_only);
 		if (ret) {
-			debug("dm_extended_scan() failed: %d\n", ret);
+			dm_warn("dm_extended_scan() failed: %d\n", ret);
 			return ret;
 		}
 	}
@@ -345,7 +345,7 @@
 
 	ret = dm_init(CONFIG_IS_ENABLED(OF_LIVE));
 	if (ret) {
-		debug("dm_init() failed: %d\n", ret);
+		dm_warn("dm_init() failed: %d\n", ret);
 		return ret;
 	}
 	if (!CONFIG_IS_ENABLED(OF_PLATDATA_INST)) {
diff --git a/drivers/core/uclass.c b/drivers/core/uclass.c
index 762536e..7ae0884 100644
--- a/drivers/core/uclass.c
+++ b/drivers/core/uclass.c
@@ -59,8 +59,8 @@
 	*ucp = NULL;
 	uc_drv = lists_uclass_lookup(id);
 	if (!uc_drv) {
-		debug("Cannot find uclass for id %d: please add the UCLASS_DRIVER() declaration for this UCLASS_... id\n",
-		      id);
+		dm_warn("Cannot find uclass for id %d: please add the UCLASS_DRIVER() declaration for this UCLASS_... id\n",
+			id);
 		/*
 		 * Use a strange error to make this case easier to find. When
 		 * a uclass is not available it can prevent driver model from
