summaryrefslogtreecommitdiffstats
path: root/common/memtest.c
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2015-10-23 11:29:59 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2015-11-03 07:27:47 +0100
commite96b1713eaef979a9e6fa41b2f63b05fadbabb3c (patch)
treee96a492a97c8070496d9c8fea5865fd6c247cd07 /common/memtest.c
parentb792124a7dd30f03b9ad0e06589b5b58ed930d3b (diff)
downloadbarebox-e96b1713eaef979a9e6fa41b2f63b05fadbabb3c.tar.gz
memtest: split tests in separate functions
The memtest does a bus integrity check and a moving inversions test. Split the tests into two separate functions so that the can be called separately. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'common/memtest.c')
-rw-r--r--common/memtest.c36
1 files changed, 1 insertions, 35 deletions
diff --git a/common/memtest.c b/common/memtest.c
index 467eea5..4a84dc3 100644
--- a/common/memtest.c
+++ b/common/memtest.c
@@ -331,8 +331,7 @@ int mem_test_bus_integrity(resource_size_t _start,
return 0;
}
-int mem_test_dram(resource_size_t _start,
- resource_size_t _end)
+int mem_test_moving_inversions(resource_size_t _start, resource_size_t _end)
{
volatile resource_size_t *start, num_words, offset, temp, anti_pattern;
@@ -438,36 +437,3 @@ int mem_test_dram(resource_size_t _start,
return 0;
}
-
-/*
- * Perform a memory test. The complete test
- * loops until interrupted by ctrl-c.
- *
- * Prameters:
- * start: start address for memory test.
- * end: end address of memory test.
- * bus_only: skip integrity check and do only a address/data bus
- * testing.
- *
- * Return value can be -EINVAL for invalid parameter or -EINTR
- * if memory test was interrupted.
- */
-int mem_test(resource_size_t _start,
- resource_size_t _end, int bus_only)
-{
- int ret;
-
- ret = mem_test_bus_integrity(_start, _end);
-
- if (ret < 0)
- return ret;
-
- /*
- * We tested only the bus if != 0
- * leaving here
- */
- if (!bus_only)
- ret = mem_test_dram(_start, _end);
-
- return ret;
-}