Simon Glass | 8f9b052 | 2024-10-21 10:19:29 +0200 | [diff] [blame^] | 1 | // SPDX-License-Identifier: GPL-2.0+ |
| 2 | /* |
| 3 | * Copyright 2024 Google LLC |
| 4 | * Written by Simon Glass <sjg@chromium.org> |
| 5 | */ |
| 6 | |
| 7 | #include <command.h> |
| 8 | #include <display_options.h> |
| 9 | #include <asm/global_data.h> |
| 10 | |
| 11 | DECLARE_GLOBAL_DATA_PTR; |
| 12 | |
| 13 | static int do_meminfo(struct cmd_tbl *cmdtp, int flag, int argc, |
| 14 | char *const argv[]) |
| 15 | { |
| 16 | puts("DRAM: "); |
| 17 | print_size(gd->ram_size, "\n"); |
| 18 | |
| 19 | return 0; |
| 20 | } |
| 21 | |
| 22 | U_BOOT_CMD( |
| 23 | meminfo, 1, 1, do_meminfo, |
| 24 | "display memory information", |
| 25 | "" |
| 26 | ); |