summaryrefslogtreecommitdiff
path: root/post
diff options
context:
space:
mode:
authorWolfgang Denk <wd@denx.de>2007-08-29 00:53:51 +0200
committerWolfgang Denk <wd@denx.de>2007-08-29 00:53:51 +0200
commit20640002e6426770ff93235e14604376dd0dcea8 (patch)
treeca26d48ece75ac65e9a54b6463ba789762666a74 /post
parenta861558c65f65f1cf1302f3a35e9db7686b9e1a3 (diff)
parent9c02defc29b57945b600714cf61ddfd02b02fb14 (diff)
Merge with /home/wd/git/u-boot/custodian/u-boot-ppc4xx
Diffstat (limited to 'post')
-rw-r--r--post/drivers/memory.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/post/drivers/memory.c b/post/drivers/memory.c
index a2c088bad8..fbc349a852 100644
--- a/post/drivers/memory.c
+++ b/post/drivers/memory.c
@@ -461,6 +461,9 @@ int memory_post_test (int flags)
unsigned long memsize = (bd->bi_memsize >= 256 << 20 ?
256 << 20 : bd->bi_memsize) - (1 << 20);
+ /* Limit area to be tested with the board info struct */
+ if (CFG_SDRAM_BASE + memsize > (ulong)bd)
+ memsize = (ulong)bd - CFG_SDRAM_BASE;
if (flags & POST_SLOWTEST) {
ret = memory_post_tests (CFG_SDRAM_BASE, memsize);