]> git.sur5r.net Git - u-boot/blobdiff - drivers/core/dump.c
core: add uclass_get_device_by_phandle_id() api
[u-boot] / drivers / core / dump.c
index fd4596ee68b727473618da856394c09a95b609cd..6c6b9444530b7f2e137d9f8c0a788c1cf0492bfc 100644 (file)
@@ -8,17 +8,16 @@
 #include <dm.h>
 #include <mapmem.h>
 #include <dm/root.h>
+#include <dm/util.h>
 
 static void show_devices(struct udevice *dev, int depth, int last_flag)
 {
        int i, is_last;
        struct udevice *child;
-       char class_name[12];
 
        /* print the first 11 characters to not break the tree-format. */
-       strlcpy(class_name, dev->uclass->uc_drv->name, sizeof(class_name));
-       printf(" %-11s [ %c ]    ", class_name,
-              dev->flags & DM_FLAG_ACTIVATED ? '+' : ' ');
+       printf(" %-10.10s [ %c ]   %-10.10s  ", dev->uclass->uc_drv->name,
+              dev->flags & DM_FLAG_ACTIVATED ? '+' : ' ', dev->driver->name);
 
        for (i = depth; i >= 0; i--) {
                is_last = (last_flag >> i) & 1;
@@ -49,7 +48,7 @@ void dm_dump_all(void)
 
        root = dm_root();
        if (root) {
-               printf(" Class       Probed   Name\n");
+               printf(" Class      Probed  Driver      Name\n");
                printf("----------------------------------------\n");
                show_devices(root, -1, 0);
        }