diff options
author | Pali Rohár <pali@kernel.org> | 2022-09-09 17:32:41 +0200 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2022-09-23 15:13:18 -0400 |
commit | d92aee57eca089e6732a5c3c79c3a319819e1bfd (patch) | |
tree | fde5cada87687153da8e9a6411795307b420d12f /common/board_f.c | |
parent | 049704f808d5e643668a33a76e55f925d4c1b36a (diff) | |
download | u-boot-d92aee57eca089e6732a5c3c79c3a319819e1bfd.zip u-boot-d92aee57eca089e6732a5c3c79c3a319819e1bfd.tar.gz u-boot-d92aee57eca089e6732a5c3c79c3a319819e1bfd.tar.bz2 |
board_f: Fix printing gd->ram_size and gd->ram_top
Members gd->ram_size and gd->ram_top are of type phys_addr_t which does not
have to fit into ulong type. So cast them into unsigned long long.
Fixes: 37dc958947ed ("global_data.h: Change ram_top type to phys_addr_t")
Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'common/board_f.c')
-rw-r--r-- | common/board_f.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/common/board_f.c b/common/board_f.c index aee3f56..970c8ff 100644 --- a/common/board_f.c +++ b/common/board_f.c @@ -328,7 +328,7 @@ static int setup_dest_addr(void) /* * Ram is setup, size stored in gd !! */ - debug("Ram size: %08lX\n", (ulong)gd->ram_size); + debug("Ram size: %08llX\n", (unsigned long long)gd->ram_size); #if CONFIG_VAL(SYS_MEM_TOP_HIDE) /* * Subtract specified amount of memory to hide so that it won't @@ -348,7 +348,7 @@ static int setup_dest_addr(void) gd->ram_top = gd->ram_base + get_effective_memsize(); gd->ram_top = board_get_usable_ram_top(gd->mon_len); gd->relocaddr = gd->ram_top; - debug("Ram top: %08lX\n", (ulong)gd->ram_top); + debug("Ram top: %08llX\n", (unsigned long long)gd->ram_top); #if defined(CONFIG_MP) && (defined(CONFIG_MPC86xx) || defined(CONFIG_E500)) /* * We need to make sure the location we intend to put secondary core |