summaryrefslogtreecommitdiff
path: root/common/image.c
diff options
context:
space:
mode:
authorMarian Balakowicz <m8@semihalf.com>2008-03-12 12:14:15 +0100
committerMarian Balakowicz <m8@semihalf.com>2008-03-12 12:14:15 +0100
commitafe45c87e3c5d77bad76b1a57dccd20764d45b5d (patch)
treedbfd59538ccc6ec6829dd60a9c5a6397f4e6b144 /common/image.c
parent3310c549a73a949430bfda90876df7552a1dab0c (diff)
[new uImage] Fix build issue on ARM
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>
Diffstat (limited to 'common/image.c')
-rw-r--r--common/image.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/common/image.c b/common/image.c
index bb57d6dba63..a2a739e79d4 100644
--- a/common/image.c
+++ b/common/image.c
@@ -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)