-#include <dm/test.h>
-#include <dm/uclass-internal.h>
-
-static int display_succ(struct device *in, char *buf)
-{
- int len;
- int ip = 0;
- char local[16];
- struct device *pos, *n, *prev = NULL;
-
- printf("%s- %s @ %08x", buf, in->name, map_to_sysmem(in));
- if (in->flags & DM_FLAG_ACTIVATED)
- puts(" - activated");
- puts("\n");
-
- 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 device *dev)
-{
- if (!dev)
- return -EINVAL;
- return display_succ(dev, "");
-}