diff options
author | Wolfgang Denk <wd@denx.de> | 2010-08-07 22:33:06 +0200 |
---|---|---|
committer | Wolfgang Denk <wd@denx.de> | 2010-08-07 22:33:06 +0200 |
commit | 3df4f46f3209c067dcadc969ed02d27c97fa3632 (patch) | |
tree | 4639307e5e9120b0c80c62da8376be3e406e84fb /common/image.c | |
parent | 9efac4a1eb99d9c5539aa6992025eeacab7980c6 (diff) | |
parent | c519facc645812c6d174c2d5b60241d23e285642 (diff) | |
download | u-boot-imx-3df4f46f3209c067dcadc969ed02d27c97fa3632.zip u-boot-imx-3df4f46f3209c067dcadc969ed02d27c97fa3632.tar.gz u-boot-imx-3df4f46f3209c067dcadc969ed02d27c97fa3632.tar.bz2 |
Merge branch 'master' of /home/wd/git/u-boot/master
Diffstat (limited to 'common/image.c')
-rw-r--r-- | common/image.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/common/image.c b/common/image.c index 6d8833e..ea59730 100644 --- a/common/image.c +++ b/common/image.c @@ -433,17 +433,23 @@ ulong getenv_bootm_low(void) phys_size_t getenv_bootm_size(void) { + phys_size_t tmp; char *s = getenv ("bootm_size"); if (s) { - phys_size_t tmp; tmp = (phys_size_t)simple_strtoull (s, NULL, 16); return tmp; } + s = getenv("bootm_low"); + if (s) + tmp = (phys_size_t)simple_strtoull (s, NULL, 16); + else + tmp = 0; + #if defined(CONFIG_ARM) - return gd->bd->bi_dram[0].size; + return gd->bd->bi_dram[0].size - tmp; #else - return gd->bd->bi_memsize; + return gd->bd->bi_memsize - tmp; #endif } |