[U-Boot] [PATCH] Kirkwood: bugfix: DRAM size initialization

g_remlin g_remlin at rocketmail.com
Thu Oct 14 15:48:05 CEST 2010


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 <g_remlin at rocketmail.com>
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;


More information about the U-Boot mailing list