[U-Boot] [PATCH] mtest: Print dcache state
Benoît Thébaudeau
benoit.thebaudeau at advansee.com
Mon Aug 13 12:59:12 CEST 2012
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 <vapier at gentoo.org>
Tested-by: Benoît Thébaudeau <benoit.thebaudeau at advansee.com>
Cc: Wolfgang Denk <wd at denx.de>
Cc: Mike Frysinger <vapier at 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);
More information about the U-Boot
mailing list