summaryrefslogtreecommitdiffstats
path: root/include/memtest.h
diff options
context:
space:
mode:
authorAlexander Aring <alex.aring@gmail.com>2013-06-04 01:13:51 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2013-06-05 22:54:35 +0200
commit3275c7ea43f366bcfac5a9f8ffc0d001592d9529 (patch)
treeb7a9eb666ca38843efc65954842ca592258ee1ec /include/memtest.h
parent47f9da43801d7a345569a35d23cd49eb355a891a (diff)
downloadbarebox-3275c7ea43f366bcfac5a9f8ffc0d001592d9529.tar.gz
barebox-3275c7ea43f366bcfac5a9f8ffc0d001592d9529.tar.xz
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 <alex.aring@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'include/memtest.h')
-rw-r--r--include/memtest.h14
1 files changed, 14 insertions, 0 deletions
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 <linux/ioport.h>
+
+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 */