]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
image: Use gd->ram_base/_size in env_get_bootm_size()
authorStefan Roese <sr@denx.de>
Wed, 12 Aug 2020 10:57:18 +0000 (12:57 +0200)
committerStefan Roese <sr@denx.de>
Wed, 26 Aug 2020 07:19:23 +0000 (09:19 +0200)
Use only gd->ram_base/_size in env_get_bootm_size() instead of bi_dram[]
in some cases and bi_memstart in others.

Signed-off-by: Stefan Roese <sr@denx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
common/image.c

index 2ed46f7685194fbaeae75f134a8638604832d113..6f68b13fced2c6833e5f13a2e29fd2f3f1dea8dc 100644 (file)
@@ -685,13 +685,8 @@ phys_size_t env_get_bootm_size(void)
                return tmp;
        }
 
-#if defined(CONFIG_ARM) || defined(CONFIG_MICROBLAZE)
-       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;
 
        s = env_get("bootm_low");
        if (s)