diff mbox series

[v4,2/9] image: Use gd->ram_base/_size in env_get_bootm_size()

Message ID 20200813054800.469284-3-sr@denx.de
State Superseded
Delegated to: Tom Rini
Headers show
Series Remove CONFIG_NR_DRAM_BANKS option and bi_memstart/memsize from bd_info | expand

Commit Message

Stefan Roese Aug. 13, 2020, 5:47 a.m. UTC
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>

---

Changes in v4:
- New patch

 common/image.c | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)
diff mbox series

Patch

diff --git a/common/image.c b/common/image.c
index 2ed46f7685..6f68b13fce 100644
--- a/common/image.c
+++ b/common/image.c
@@ -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)