From: Tom Rini Date: Mon, 7 Sep 2020 18:31:00 +0000 (-0400) Subject: Merge branch 'remove-config-nr-dram-banks-v9-2020-08-26' of https://gitlab.denx.de... X-Git-Url: http://git.dujemihanovic.xyz/?a=commitdiff_plain;h=314b9b4a38befd120ce1c566d9eea8e0ec9d8336;p=u-boot.git Merge branch 'remove-config-nr-dram-banks-v9-2020-08-26' of https://gitlab.denx.de/u-boot/custodians/u-boot-marvell into next --- 314b9b4a38befd120ce1c566d9eea8e0ec9d8336 diff --cc common/image.c index da8bccd400,6f68b13fce..645bfef169 --- a/common/image.c +++ b/common/image.c @@@ -685,18 -685,9 +685,12 @@@ phys_size_t env_get_bootm_size(void return tmp; } - #if (defined(CONFIG_ARM) || defined(CONFIG_MICROBLAZE)) && \ - defined(CONFIG_NR_DRAM_BANKS) - start = gd->bd->bi_dram[0].start; - size = gd->bd->bi_dram[0].size; - #else - start = gd->bd->bi_memstart; - size = gd->bd->bi_memsize; - #endif + start = gd->ram_base; + size = gd->ram_size; + if (start + size > gd->ram_top) + size = gd->ram_top - start; + s = env_get("bootm_low"); if (s) tmp = (phys_size_t)simple_strtoull(s, NULL, 16);