-#include <dm/test.h>
-#include <dm/uclass-internal.h>
-
-/**
- * dm_display_line() - Display information about a single device
- *
- * Displays a single line of information with an option prefix
- *
- * @dev: Device to display
- * @buf: Prefix to display at the start of the line
- */
-static void dm_display_line(struct udevice *dev, char *buf)
-{
- printf("%s- %c %s @ %08lx", buf,
- dev->flags & DM_FLAG_ACTIVATED ? '*' : ' ',
- dev->name, (ulong)map_to_sysmem(dev));
- puts("\n");
-}
-
-static int display_succ(struct udevice *in, char *buf)
-{
- int len;
- int ip = 0;
- char local[16];
- struct udevice *pos, *n, *prev = NULL;
-
- dm_display_line(in, buf);
-
- if (list_empty(&in->child_head))
- return 0;
-
- len = strlen(buf);
- strncpy(local, buf, sizeof(local));
- snprintf(local + len, 2, "|");
- if (len && local[len - 1] == '`')
- local[len - 1] = ' ';
-
- list_for_each_entry_safe(pos, n, &in->child_head, sibling_node) {
- if (ip++)
- display_succ(prev, local);
- prev = pos;
- }
-
- snprintf(local + len, 2, "`");
- display_succ(prev, local);
-
- return 0;
-}
-
-static int dm_dump(struct udevice *dev)
-{
- if (!dev)
- return -EINVAL;
- return display_succ(dev, "");
-}