Remove memtest
authorJean THOMAS <git0@pub.jeanthomas.me>
Thu, 30 Jul 2020 14:40:29 +0000 (16:40 +0200)
committerJean THOMAS <git0@pub.jeanthomas.me>
Thu, 30 Jul 2020 14:40:29 +0000 (16:40 +0200)
libgram/Makefile
libgram/src/memtest.c [deleted file]

index fffed37b52c13b942f40f3a70e2f3c8f50c5056b..80f454ff2f0d18a9a17d87a8d56a24c49feeb130 100644 (file)
@@ -1,4 +1,4 @@
-OBJS := src/init.o src/memtest.o src/dfii.o src/calibration.o
+OBJS := src/init.o src/dfii.o src/calibration.o
 
 TRIPLE := riscv64-unknown-elf-
 
diff --git a/libgram/src/memtest.c b/libgram/src/memtest.c
deleted file mode 100644 (file)
index 8dd28c2..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-#include <gram.h>
-
-static int memtest8(struct gramCtx *ctx, size_t length) {
-       volatile uint8_t *ram = (volatile uint8_t*)ctx->ddr_base;
-       size_t i;
-
-       for (i = 0; i < length; i++) {
-               ram[i] = 0xDE;
-       }
-
-       for (i = 0; i < length; i++) {
-               if (ram[i] != 0xDE) {
-                       return GRAM_ERR_MEMTEST;
-               }
-       }
-
-       return GRAM_ERR_NONE;
-}
-
-static int memtest32(struct gramCtx *ctx, size_t length) {
-       volatile uint32_t *ram = (volatile uint32_t*)ctx->ddr_base;
-       size_t i;
-
-       for (i = 0; i < length; i++) {
-               ram[i] = 0xFEEDFACE;
-       }
-
-       for (i = 0; i < length; i++) {
-               if (ram[i] != 0xFEEDFACE) {
-                       return GRAM_ERR_MEMTEST;
-               }
-       }
-
-       return GRAM_ERR_NONE;
-}
-
-int gram_memtest(struct gramCtx *ctx, size_t length, enum GramWidth width) {
-       if (width == GRAM_8B) {
-               return memtest8(ctx, length);
-       } else if (width == GRAM_32B) {
-               return memtest32(ctx, length);
-       }
-
-       return GRAM_ERR_UNDOCUMENTED;
-}