]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
dm: Use '*' to indicate a device is activated
authorSimon Glass <sjg@chromium.org>
Sat, 24 May 2014 21:21:07 +0000 (15:21 -0600)
committerSimon Glass <sjg@chromium.org>
Sat, 21 Jun 2014 16:12:43 +0000 (10:12 -0600)
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>
test/dm/cmd_dm.c

index aa8122c00541f41b4e46845977628775bc172ca0..96f10f3b1d45b9b19fb7a296be8394be9b1f78fb 100644 (file)
@@ -23,9 +23,9 @@ static int display_succ(struct udevice *in, char *buf)
        char local[16];
        struct udevice *pos, *n, *prev = NULL;
 
-       printf("%s- %s @ %08lx", buf, in->name, (ulong)map_to_sysmem(in));
-       if (in->flags & DM_FLAG_ACTIVATED)
-               puts(" - activated");
+       printf("%s- %c %s @ %08lx", buf,
+              in->flags & DM_FLAG_ACTIVATED ? '*' : ' ',
+              in->name, (ulong)map_to_sysmem(in));
        puts("\n");
 
        if (list_empty(&in->child_head))
@@ -84,8 +84,9 @@ static int do_dm_dump_uclass(cmd_tbl_t *cmdtp, int flag, int argc,
                for (ret = uclass_first_device(id, &dev);
                     dev;
                     ret = uclass_next_device(&dev)) {
-                       printf("  %s @ %08lx:\n", dev->name,
-                              (ulong)map_to_sysmem(dev));
+                       printf("  %c %s @ %08lx:\n",
+                              dev->flags & DM_FLAG_ACTIVATED ? '*' : ' ',
+                              dev->name, (ulong)map_to_sysmem(dev));
                }
                puts("\n");
        }