]> git.sur5r.net Git - u-boot/commitdiff
meminfo cmd: Enable printing >=4GiB SDRAM sizes
authorAndrew Bradford <andrew.bradford@kodakalaris.com>
Fri, 22 May 2015 12:30:14 +0000 (08:30 -0400)
committerTom Rini <trini@konsulko.com>
Thu, 28 May 2015 12:18:21 +0000 (08:18 -0400)
gd->ram_size is stored as phys_size_t type which can be bigger than an
unsigned long on some architectures.  When using unsigned long type,
SDRAM of 4GiB or larger will not print the correct size, but using
phys_size_t will.

Signed-off-by: Andrew Bradford <andrew.bradford@kodakalaris.com>
common/cmd_mem.c
include/common.h

index 2e85d53dd23c02902b6e4973ad3cb2e98bbda678..43c3fb62bffec59d3e36adab0b25535918be4b18 100644 (file)
@@ -1325,7 +1325,7 @@ U_BOOT_CMD(
 #endif
 
 #ifdef CONFIG_CMD_MEMINFO
-__weak void board_show_dram(ulong size)
+__weak void board_show_dram(phys_size_t size)
 {
        puts("DRAM:  ");
        print_size(size, "\n");
index d4d704a6af76426c72d1af3263f7afd1e985c42a..ea5aeb0014aca7c58402424eab61cb09e11b103d 100644 (file)
@@ -274,7 +274,7 @@ __weak int arch_reserve_stacks(void);
  *
  * @param size Size of DRAM (which should be displayed along with other info)
  */
-void board_show_dram(ulong size);
+void board_show_dram(phys_size_t size);
 
 /**
  * arch_fixup_fdt() - Write arch-specific information to fdt