Commit 4af5b1445c2c17b72f515134d510d37e05a344f1
1 parent
1805bfcad0
Exists in
v2017.01-smarct4x
and in
40 other branches
dm: Use '*' to indicate a device is activated
Make both dm enumeration commands support showing whether a driver is active or not, and use a consistent indicator (an asterisk). Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Marek Vasut <marex@denx.de>
Showing 1 changed file with 6 additions and 5 deletions Side-by-side Diff
test/dm/cmd_dm.c
... | ... | @@ -23,9 +23,9 @@ |
23 | 23 | char local[16]; |
24 | 24 | struct udevice *pos, *n, *prev = NULL; |
25 | 25 | |
26 | - printf("%s- %s @ %08lx", buf, in->name, (ulong)map_to_sysmem(in)); | |
27 | - if (in->flags & DM_FLAG_ACTIVATED) | |
28 | - puts(" - activated"); | |
26 | + printf("%s- %c %s @ %08lx", buf, | |
27 | + in->flags & DM_FLAG_ACTIVATED ? '*' : ' ', | |
28 | + in->name, (ulong)map_to_sysmem(in)); | |
29 | 29 | puts("\n"); |
30 | 30 | |
31 | 31 | if (list_empty(&in->child_head)) |
... | ... | @@ -84,8 +84,9 @@ |
84 | 84 | for (ret = uclass_first_device(id, &dev); |
85 | 85 | dev; |
86 | 86 | ret = uclass_next_device(&dev)) { |
87 | - printf(" %s @ %08lx:\n", dev->name, | |
88 | - (ulong)map_to_sysmem(dev)); | |
87 | + printf(" %c %s @ %08lx:\n", | |
88 | + dev->flags & DM_FLAG_ACTIVATED ? '*' : ' ', | |
89 | + dev->name, (ulong)map_to_sysmem(dev)); | |
89 | 90 | } |
90 | 91 | puts("\n"); |
91 | 92 | } |