arm, post, memory: fix bug if sdram base != 0x00000000

commit 8d3fcb5e60 breaks post
memory support for sdram base != 0x00000000. Fix this.

Signed-off-by: Heiko Schocher <hs@denx.de>
Cc: Valentin Longchamp <valentin.longchamp@keymile.com>
Cc: Holger Brunck <holger.brunck@keymile.com>
Acked-by: Mike Frysinger <vapier@gentoo.org>
This commit is contained in:
Heiko Schocher 2011-10-06 20:40:00 +00:00 committed by Wolfgang Denk
parent 23d8f778c8
commit 7b5d61b5a3
1 changed files with 4 additions and 3 deletions

View File

@ -466,10 +466,11 @@ static int memory_post_test_regions(unsigned long start, unsigned long size)
for (i = 0; i < (size >> 20) && (!ret); i++) {
if (!ret)
ret = memory_post_test_patterns(i << 20, 0x800);
if (!ret)
ret = memory_post_test_patterns((i << 20) + 0xff800,
ret = memory_post_test_patterns(start + (i << 20),
0x800);
if (!ret)
ret = memory_post_test_patterns(start + (i << 20) +
0xff800, 0x800);
}
return ret;