]> git.sur5r.net Git - u-boot/commitdiff
common: Display >=4GiB memory bank size
authorBin Meng <bmeng.cn@gmail.com>
Thu, 6 Aug 2015 08:31:20 +0000 (01:31 -0700)
committerSimon Glass <sjg@chromium.org>
Fri, 14 Aug 2015 09:24:20 +0000 (03:24 -0600)
bd->bi_dram[] has both start address and size defined as 32-bit,
which is not the case on some platforms where >=4GiB memory bank
is used. Change them to support such memory banks.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
common/board_f.c
include/asm-generic/u-boot.h

index c7cc67c7a482901f993781452919880280f1c2a8..8cca4def2c7924fad2d5f31106cd42739e69fdcd 100644 (file)
@@ -206,7 +206,8 @@ static int show_dram_config(void)
        debug("\nRAM Configuration:\n");
        for (i = size = 0; i < CONFIG_NR_DRAM_BANKS; i++) {
                size += gd->bd->bi_dram[i].size;
-               debug("Bank #%d: %08lx ", i, gd->bd->bi_dram[i].start);
+               debug("Bank #%d: %llx ", i,
+                     (unsigned long long)(gd->bd->bi_dram[i].start));
 #ifdef DEBUG
                print_size(gd->bd->bi_dram[i].size, "\n");
 #endif
index c918049386efab781d2fa342937241f0b30ae045..9f3351d602e86442cb1a302e37d275fe0aeec8ed 100644 (file)
@@ -130,8 +130,8 @@ typedef struct bd_info {
        ulong           bi_boot_params; /* where this board expects params */
 #ifdef CONFIG_NR_DRAM_BANKS
        struct {                        /* RAM configuration */
-               ulong start;
-               ulong size;
+               phys_addr_t start;
+               phys_size_t size;
        } bi_dram[CONFIG_NR_DRAM_BANKS];
 #endif /* CONFIG_NR_DRAM_BANKS */
 } bd_t;