mtest tests many types of memory accesses in many different conditions. If
dcache is enabled, memory accesses are likely bursts, and some memory accesses
are simply skipped. Hence, mtest results may change depending on dcache state.

This patch prints the dcache state at the beginning of mtest so as to keep the
user informed of the test conditions.

Signed-off-by: Mike Frysinger <vap...@gentoo.org>
Tested-by: Benoît Thébaudeau <benoit.thebaud...@advansee.com>
Cc: Wolfgang Denk <w...@denx.de>
Cc: Mike Frysinger <vap...@gentoo.org>
---
 .../common/cmd_mem.c                               |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git u-boot-4d3c95f.orig/common/cmd_mem.c u-boot-4d3c95f/common/cmd_mem.c
index 18f0a3f..5628f6a 100644
--- u-boot-4d3c95f.orig/common/cmd_mem.c
+++ u-boot-4d3c95f/common/cmd_mem.c
@@ -651,8 +651,10 @@ int do_mem_mtest (cmd_tbl_t *cmdtp, int flag, int argc, 
char * const argv[])
        else
                iteration_limit = 0;
 
+       printf("Testing %08x ... %08x (dcache: %s):\n", (uint)start, (uint)end,
+               dcache_status() ? "on" : "off");
+
 #if defined(CONFIG_SYS_ALT_MEMTEST)
-       printf ("Testing %08x ... %08x:\n", (uint)start, (uint)end);
        debug("%s:%d: start 0x%p end 0x%p\n",
                __FUNCTION__, __LINE__, start, end);
 
_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

Reply via email to