1 // SPDX-License-Identifier: GPL-2.0+
3 * Copyright (c) 2013 Google, Inc
6 * Marek Vasut <marex@denx.de>
14 static int do_dm_dump_driver_compat(struct cmd_tbl *cmdtp, int flag, int argc,
17 dm_dump_driver_compat();
22 static int do_dm_dump_devres(struct cmd_tbl *cmdtp, int flag, int argc,
30 static int do_dm_dump_drivers(struct cmd_tbl *cmdtp, int flag, int argc,
38 #if CONFIG_IS_ENABLED(DM_STATS)
39 static int do_dm_dump_mem(struct cmd_tbl *cmdtp, int flag, int argc,
51 static int do_dm_dump_static_driver_info(struct cmd_tbl *cmdtp, int flag,
52 int argc, char * const argv[])
54 dm_dump_static_driver_info();
59 static int do_dm_dump_tree(struct cmd_tbl *cmdtp, int flag, int argc,
67 static int do_dm_dump_uclass(struct cmd_tbl *cmdtp, int flag, int argc,
75 #if CONFIG_IS_ENABLED(DM_STATS)
76 #define DM_MEM_HELP "dm mem Provide a summary of memory usage\n"
77 #define DM_MEM U_BOOT_SUBCMD_MKENT(mem, 1, 1, do_dm_dump_mem),
83 #if CONFIG_IS_ENABLED(SYS_LONGHELP)
84 static char dm_help_text[] =
85 "compat Dump list of drivers with compatibility strings\n"
86 "dm devres Dump list of device resources for each device\n"
87 "dm drivers Dump list of drivers with uclass and instances\n"
89 "dm static Dump list of drivers with static platform data\n"
90 "dm tree Dump tree of driver model devices ('*' = activated)\n"
91 "dm uclass Dump list of instances for each uclass"
95 U_BOOT_CMD_WITH_SUBCMDS(dm, "Driver model low level access", dm_help_text,
96 U_BOOT_SUBCMD_MKENT(compat, 1, 1, do_dm_dump_driver_compat),
97 U_BOOT_SUBCMD_MKENT(devres, 1, 1, do_dm_dump_devres),
98 U_BOOT_SUBCMD_MKENT(drivers, 1, 1, do_dm_dump_drivers),
100 U_BOOT_SUBCMD_MKENT(static, 1, 1, do_dm_dump_static_driver_info),
101 U_BOOT_SUBCMD_MKENT(tree, 1, 1, do_dm_dump_tree),
102 U_BOOT_SUBCMD_MKENT(uclass, 1, 1, do_dm_dump_uclass));