#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;
root = dm_root();
if (root) {
- printf(" Class Probed Name\n");
+ printf(" Class Probed Driver Name\n");
printf("----------------------------------------\n");
show_devices(root, -1, 0);
}