]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
cmd: bdinfo: Implement support for printing memory layout via bdinfo -m
authorMarek Vasut <marek.vasut+renesas@mailbox.org>
Sat, 7 Oct 2023 21:40:59 +0000 (23:40 +0200)
committerTom Rini <trini@konsulko.com>
Sat, 9 Dec 2023 13:42:29 +0000 (08:42 -0500)
Add support for printing memory layout only via 'bdinfo -m' .

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
cmd/bdinfo.c

index 2c0d5e9c01bcffa36c26ebcf9055ac29aab0668d..c720ee6f9b698248d26952fddb83cc78636e1902 100644 (file)
@@ -193,10 +193,13 @@ int do_bdinfo(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
                return bdinfo_print_all(bd);
 
        getopt_init_state(&gs);
-       while ((opt = getopt(&gs, argc, argv, "a")) > 0) {
+       while ((opt = getopt(&gs, argc, argv, "am")) > 0) {
                switch (opt) {
                case 'a':
                        return bdinfo_print_all(bd);
+               case 'm':
+                       print_bi_dram(bd);
+                       return CMD_RET_SUCCESS;
                default:
                        return CMD_RET_USAGE;
                }