* [U-Boot] [PATCH] meminfo cmd: Enable printing >=4GiB SDRAM sizes
@ 2015-05-22 12:30 andrew at bradfordembedded.com
2015-05-28 13:24 ` [U-Boot] " Tom Rini
0 siblings, 1 reply; 2+ messages in thread
From: andrew at bradfordembedded.com @ 2015-05-22 12:30 UTC (permalink / raw)
To: u-boot
From: Andrew Bradford <andrew.bradford@kodakalaris.com>
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 | 2 +-
include/common.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/common/cmd_mem.c b/common/cmd_mem.c
index 2e85d53..43c3fb6 100644
--- a/common/cmd_mem.c
+++ b/common/cmd_mem.c
@@ -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");
diff --git a/include/common.h b/include/common.h
index d4d704a..ea5aeb0 100644
--- a/include/common.h
+++ b/include/common.h
@@ -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
--
1.9.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [U-Boot] meminfo cmd: Enable printing >=4GiB SDRAM sizes
2015-05-22 12:30 [U-Boot] [PATCH] meminfo cmd: Enable printing >=4GiB SDRAM sizes andrew at bradfordembedded.com
@ 2015-05-28 13:24 ` Tom Rini
0 siblings, 0 replies; 2+ messages in thread
From: Tom Rini @ 2015-05-28 13:24 UTC (permalink / raw)
To: u-boot
On Fri, May 22, 2015 at 08:30:14AM -0400, Andrew Bradford wrote:
> From: Andrew Bradford <andrew.bradford@kodakalaris.com>
>
> 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>
Applied to u-boot/master, thanks!
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20150528/c00cd0f0/attachment.sig>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-05-28 13:24 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-05-22 12:30 [U-Boot] [PATCH] meminfo cmd: Enable printing >=4GiB SDRAM sizes andrew at bradfordembedded.com
2015-05-28 13:24 ` [U-Boot] " Tom Rini
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox