ARM platforms don't have a bd->bi_memsize so use bd->bi_dram[0].size instead.

Signed-off-by: Kumar Gala <[EMAIL PROTECTED]>
---

Let's see if this fixes the issue on ARM.

 common/image.c |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/common/image.c b/common/image.c
index 9e446fa..4e0e96d 100644
--- a/common/image.c
+++ b/common/image.c
@@ -140,8 +140,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
@@ -155,7 +157,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)
-- 
1.5.4.1


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
U-Boot-Users mailing list
U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users

Reply via email to