]> git.sur5r.net Git - u-boot/commitdiff
[new uImage] Fix build issue on ARM
authorMarian Balakowicz <m8@semihalf.com>
Wed, 12 Mar 2008 11:14:15 +0000 (12:14 +0100)
committerMarian Balakowicz <m8@semihalf.com>
Wed, 12 Mar 2008 11:14:15 +0000 (12:14 +0100)
ARM platforms don't have a bd->bi_memsize so use bd->bi_dram[0].size instead.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
common/image.c

index bb57d6dba63939d0a8f5b376fa4b79dd95366eb0..a2a739e79d41f288ef44924f75cdaaaa0b1db7c2 100644 (file)
@@ -463,8 +463,10 @@ ulong getenv_bootm_low(void)
                return tmp;
        }
 
-#ifdef CFG_SDRAM_BASE
+#if defined(CFG_SDRAM_BASE)
        return CFG_SDRAM_BASE;
+#elif defined(CONFIG_ARM)
+       return gd->bd->bi_dram[0].start;
 #else
        return 0;
 #endif
@@ -478,7 +480,11 @@ ulong getenv_bootm_size(void)
                return tmp;
        }
 
+#if defined(CONFIG_ARM)
+       return gd->bd->bi_dram[0].size;
+#else
        return gd->bd->bi_memsize;
+#endif
 }
 
 void memmove_wd (void *to, void *from, size_t len, ulong chunksz)