diff options
author | Sean Anderson <seanga2@gmail.com> | 2020-01-17 14:48:09 -0500 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2020-02-05 19:33:46 -0700 |
commit | 7b9d60fc1ff67b3959a7db394084b27268a7686d (patch) | |
tree | 6196a41c5c8016aa5803d83dff50d83f4d5a543b /cmd | |
parent | 2f7c53cbd3e8094d2c4398b293a68304b7af721c (diff) |
cmd: Add command to dump drivers and compatible strings
This adds a subcommand to dm to dump out what drivers are installed, and their
compatible strings. I have found this useful in ensuring that I have the correct
drivers compiled, and that I have put in the correct compatible strings.
Signed-off-by Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'cmd')
-rw-r--r-- | cmd/dm.c | 12 |
1 files changed, 11 insertions, 1 deletions
@@ -40,10 +40,19 @@ static int do_dm_dump_devres(cmd_tbl_t *cmdtp, int flag, int argc, return 0; } +static int do_dm_dump_drivers(cmd_tbl_t *cmdtp, int flag, int argc, + char * const argv[]) +{ + dm_dump_drivers(); + + return 0; +} + static cmd_tbl_t test_commands[] = { U_BOOT_CMD_MKENT(tree, 0, 1, do_dm_dump_all, "", ""), U_BOOT_CMD_MKENT(uclass, 1, 1, do_dm_dump_uclass, "", ""), U_BOOT_CMD_MKENT(devres, 1, 1, do_dm_dump_devres, "", ""), + U_BOOT_CMD_MKENT(drivers, 1, 1, do_dm_dump_drivers, "", ""), }; static __maybe_unused void dm_reloc(void) @@ -84,5 +93,6 @@ U_BOOT_CMD( "Driver model low level access", "tree Dump driver model tree ('*' = activated)\n" "dm uclass Dump list of instances for each uclass\n" - "dm devres Dump list of device resources for each device" + "dm devres Dump list of device resources for each device\n" + "dm drivers Dump list of drivers and their compatible strings\n" ); |