2 * Copyright (c) 2013 Google, Inc
5 * Marek Vasut <marex@denx.de>
7 * SPDX-License-Identifier: GPL-2.0+
19 static int do_dm_dump_all(cmd_tbl_t *cmdtp, int flag, int argc,
27 static int do_dm_dump_uclass(cmd_tbl_t *cmdtp, int flag, int argc,
35 static cmd_tbl_t test_commands[] = {
36 U_BOOT_CMD_MKENT(tree, 0, 1, do_dm_dump_all, "", ""),
37 U_BOOT_CMD_MKENT(uclass, 1, 1, do_dm_dump_uclass, "", ""),
40 static int do_dm(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
47 test_cmd = find_cmd_tbl(argv[1], test_commands,
48 ARRAY_SIZE(test_commands));
51 if (!test_cmd || argc > test_cmd->maxargs)
54 ret = test_cmd->cmd(test_cmd, flag, argc, argv);
56 return cmd_process_error(test_cmd, ret);
61 "Driver model low level access",
62 "tree Dump driver model tree ('*' = activated)\n"
63 "dm uclass Dump list of instances for each uclass"