[U-Boot] [PATCH v3 2/5] arm bootm: Do not append zero ATAG_MEM

Pali Rohár pali.rohar at gmail.com
Sat Oct 13 21:31:57 CEST 2012


If dram bank size is calculated at runtime, it can be zero on some boards.
This patch added code which ignore these zero bank size in ATAG_MEM.

Signed-off-by: Pali Rohár <pali.rohar at gmail.com>
---
 arch/arm/lib/bootm.c |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/arch/arm/lib/bootm.c b/arch/arm/lib/bootm.c
index c092bfa..925925d 100644
--- a/arch/arm/lib/bootm.c
+++ b/arch/arm/lib/bootm.c
@@ -132,6 +132,9 @@ static void setup_memory_tags(bd_t *bd)
 	int i;
 
 	for (i = 0; i < CONFIG_NR_DRAM_BANKS; i++) {
+		if (bd->bi_dram[i].size == 0)
+			continue;
+
 		params->hdr.tag = ATAG_MEM;
 		params->hdr.size = tag_size (tag_mem32);
 
-- 
1.7.9.5



More information about the U-Boot mailing list