diff options
author | Masahiro Yamada <yamada.masahiro@socionext.com> | 2020-01-30 22:20:37 +0900 |
---|---|---|
committer | Masahiro Yamada <yamada.masahiro@socionext.com> | 2020-02-01 01:14:32 +0900 |
commit | 6da69d33f5280c9c80690310e1fb3d3e1c821d3e (patch) | |
tree | af3454c128dadf22dec4a5403649446f366dba0a /arch/arm/mach-uniphier | |
parent | 407b01b3b3f548d951b3c35a40bb49bb82f31748 (diff) | |
download | u-boot-6da69d33f5280c9c80690310e1fb3d3e1c821d3e.tar.gz |
ARM: uniphier: set gd->ram_base correctly
gd->ram_base is not set at all if the end address of the DRAM ch0
exceeds the 4GB limit.
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Diffstat (limited to 'arch/arm/mach-uniphier')
-rw-r--r-- | arch/arm/mach-uniphier/dram_init.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/arch/arm/mach-uniphier/dram_init.c b/arch/arm/mach-uniphier/dram_init.c index 13821a9288..5f9d90fe6d 100644 --- a/arch/arm/mach-uniphier/dram_init.c +++ b/arch/arm/mach-uniphier/dram_init.c @@ -248,12 +248,7 @@ int dram_init(void) max_size = (1ULL << 32) - dram_map[i].base; - if (dram_map[i].size > max_size) { - gd->ram_size += max_size; - break; - } - - gd->ram_size += dram_map[i].size; + gd->ram_size = min(dram_map[i].size, max_size); if (!valid_bank_found) gd->ram_base = dram_map[i].base; |