From: Heiko Schocher Date: Thu, 6 Oct 2011 20:40:00 +0000 (+0000) Subject: arm, post, memory: fix bug if sdram base != 0x00000000 X-Git-Url: http://git.dujemihanovic.xyz/?a=commitdiff_plain;h=7b5d61b5a3dd6c6f8f0723941beb700277de9407;p=u-boot.git arm, post, memory: fix bug if sdram base != 0x00000000 commit 8d3fcb5e60b6c8e1d530dbc2e2e33ec6a44670da breaks post memory support for sdram base != 0x00000000. Fix this. Signed-off-by: Heiko Schocher Cc: Valentin Longchamp Cc: Holger Brunck Acked-by: Mike Frysinger --- diff --git a/post/drivers/memory.c b/post/drivers/memory.c index 69973c0f44..d25e3235ca 100644 --- a/post/drivers/memory.c +++ b/post/drivers/memory.c @@ -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;