diff options
author | Tom Rini <trini@ti.com> | 2013-01-11 14:38:24 -0700 |
---|---|---|
committer | Tom Rini <trini@ti.com> | 2013-01-11 14:38:24 -0700 |
commit | 7a8e739cd5bc0c48511d343f469af89a88a3294d (patch) | |
tree | 2198c265cd9d83d58b42ab8a8e66c2fff4d4545a /common | |
parent | 6fb4d74e59750b43f00d460c569e8a30c67c5bb0 (diff) | |
parent | 59ee45ee91cc91b392a8e2684bfcb8c933ce4967 (diff) | |
download | u-boot-imx-7a8e739cd5bc0c48511d343f469af89a88a3294d.zip u-boot-imx-7a8e739cd5bc0c48511d343f469af89a88a3294d.tar.gz u-boot-imx-7a8e739cd5bc0c48511d343f469af89a88a3294d.tar.bz2 |
Merge branch 'master' of git://git.denx.de/u-boot-arm
Diffstat (limited to 'common')
-rw-r--r-- | common/cmd_mem.c | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/common/cmd_mem.c b/common/cmd_mem.c index 4d64cff..0f3ffc8 100644 --- a/common/cmd_mem.c +++ b/common/cmd_mem.c @@ -33,6 +33,9 @@ #include <dataflash.h> #endif #include <watchdog.h> +#include <linux/compiler.h> + +DECLARE_GLOBAL_DATA_PTR; static int mod_mem(cmd_tbl_t *, int, int, int, char * const []); @@ -1203,6 +1206,22 @@ U_BOOT_CMD( #endif +#ifdef CONFIG_CMD_MEMINFO +__weak void board_show_dram(ulong size) +{ + puts("DRAM: "); + print_size(size, "\n"); +} + +static int do_mem_info(cmd_tbl_t *cmdtp, int flag, int argc, + char * const argv[]) +{ + board_show_dram(gd->ram_size); + + return 0; +} +#endif + U_BOOT_CMD( base, 2, 1, do_mem_base, "print or set address offset", @@ -1243,3 +1262,11 @@ U_BOOT_CMD( "[.b, .w, .l] address value delay(ms)" ); #endif /* CONFIG_MX_CYCLIC */ + +#ifdef CONFIG_CMD_MEMINFO +U_BOOT_CMD( + meminfo, 3, 1, do_mem_info, + "display memory information", + "" +); +#endif |