From 3275c7ea43f366bcfac5a9f8ffc0d001592d9529 Mon Sep 17 00:00:00 2001 From: Alexander Aring Date: Tue, 4 Jun 2013 01:13:51 +0200 Subject: common: add memtest.c with mem_test routine Add mem_test routine. Useful to detect timing problems if someone porting a new device to barebox. This test includes a data bus test, address bus test and integrity check of memory. This mem_test routine has as parameter start and end address of testing space. The last parameter can skip the integrity check. Signed-off-by: Alexander Aring Signed-off-by: Sascha Hauer --- include/memtest.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 include/memtest.h (limited to 'include/memtest.h') diff --git a/include/memtest.h b/include/memtest.h new file mode 100644 index 0000000000..a337be832f --- /dev/null +++ b/include/memtest.h @@ -0,0 +1,14 @@ +#ifndef __MEMTEST_H +#define __MEMTEST_H + +#include + +struct mem_test_resource { + struct resource *r; + struct list_head list; +}; + +int mem_test(resource_size_t _start, + resource_size_t _end, int bus_only); + +#endif /* __MEMTEST_H */ -- cgit v1.2.3