From mboxrd@z Thu Jan 1 00:00:00 1970 From: g_remlin Date: Thu, 14 Oct 2010 14:48:05 +0100 Subject: [U-Boot] [PATCH] Kirkwood: bugfix: DRAM size initialization In-Reply-To: <1287060429-14634-1-git-send-email-tanmay.upadhyay@einfochips.com> References: <1287060429-14634-1-git-send-email-tanmay.upadhyay@einfochips.com> Message-ID: <4CB70A15.4050001@rocketmail.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Do we want them set to zero regardless of their size, or do we just want to not include the further banks in gd->ram_size. Signed-off-by: Gray Remlin diff --git a/arch/arm/cpu/arm926ejs/kirkwood/dram.c b/arch/arm/cpu/arm926ejs/kirkwood/dram.c index 7439c87..3f5eae5 100644 --- a/arch/arm/cpu/arm926ejs/kirkwood/dram.c +++ b/arch/arm/cpu/arm926ejs/kirkwood/dram.c @@ -75,10 +75,8 @@ int dram_init(void) * If the gap is found, ram_size will be reported for * consecutive memory only */ - if (gd->bd->bi_dram[i].start != gd->ram_size) - break; - - gd->ram_size += gd->bd->bi_dram[i].size; + if (gd->bd->bi_dram[i].start == gd->ram_size) + gd->ram_size += gd->bd->bi_dram[i].size; } return 0;