aboutsummaryrefslogtreecommitdiff
path: root/drivers/core
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2019-09-25 08:55:45 -0600
committerBin Meng <bmeng.cn@gmail.com>2019-10-08 13:57:37 +0800
commitd3e773613b6d159204de4894a4e0d191717ce318 (patch)
treebd583514af78c701fb9e4b0fefbae31d6332ea62 /drivers/core
parentbdeb2bccbf40474eca8ef039ab794ba46cd971e5 (diff)
downloadu-boot-d3e773613b6d159204de4894a4e0d191717ce318.zip
u-boot-d3e773613b6d159204de4894a4e0d191717ce318.tar.gz
u-boot-d3e773613b6d159204de4894a4e0d191717ce318.tar.bz2
dm: core: Use U-Boot logging instead of pr_debug()
The pr_debug() functions do not response to setting the log level and in fact have their own separate log level. Use U-Boot logging instead. Perhaps we should make these options redirect to log_debug(), etc.? Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Diffstat (limited to 'drivers/core')
-rw-r--r--drivers/core/lists.c20
1 files changed, 12 insertions, 8 deletions
diff --git a/drivers/core/lists.c b/drivers/core/lists.c
index a1f8284..4681b3e 100644
--- a/drivers/core/lists.c
+++ b/drivers/core/lists.c
@@ -6,6 +6,8 @@
* Marek Vasut <marex@denx.de>
*/
+#define LOG_CATEGORY LOGC_DM
+
#include <common.h>
#include <errno.h>
#include <dm/device.h>
@@ -139,13 +141,13 @@ int lists_bind_fdt(struct udevice *parent, ofnode node, struct udevice **devp,
if (devp)
*devp = NULL;
name = ofnode_get_name(node);
- pr_debug("bind node %s\n", name);
+ log_debug("bind node %s\n", name);
compat_list = ofnode_get_property(node, "compatible", &compat_length);
if (!compat_list) {
if (compat_length == -FDT_ERR_NOTFOUND) {
- pr_debug("Device '%s' has no compatible string\n",
- name);
+ log_debug("Device '%s' has no compatible string\n",
+ name);
return 0;
}
@@ -160,8 +162,8 @@ int lists_bind_fdt(struct udevice *parent, ofnode node, struct udevice **devp,
*/
for (i = 0; i < compat_length; i += strlen(compat) + 1) {
compat = compat_list + i;
- pr_debug(" - attempt to match compatible string '%s'\n",
- compat);
+ log_debug(" - attempt to match compatible string '%s'\n",
+ compat);
for (entry = driver; entry != driver + n_ents; entry++) {
ret = driver_check_compatible(entry->of_match, &id,
@@ -178,11 +180,13 @@ int lists_bind_fdt(struct udevice *parent, ofnode node, struct udevice **devp,
return 0;
}
- pr_debug(" - found match at '%s'\n", entry->name);
+ log_debug(" - found match at '%s': '%s' matches '%s'\n",
+ entry->name, entry->of_match->compatible,
+ id->compatible);
ret = device_bind_with_driver_data(parent, entry, name,
id->data, node, &dev);
if (ret == -ENODEV) {
- pr_debug("Driver '%s' refuses to bind\n", entry->name);
+ log_debug("Driver '%s' refuses to bind\n", entry->name);
continue;
}
if (ret) {
@@ -198,7 +202,7 @@ int lists_bind_fdt(struct udevice *parent, ofnode node, struct udevice **devp,
}
if (!found && !result && ret != -ENODEV)
- pr_debug("No match for node '%s'\n", name);
+ log_debug("No match for node '%s'\n", name);
return result;
}