From 892704e8fdd4405f74355f4be56656eb4e2195fa Mon Sep 17 00:00:00 2001 From: Jean THOMAS Date: Thu, 30 Jul 2020 18:59:04 +0200 Subject: [PATCH] Remove unused memtest --- libgram/src/calibration.c | 30 ------------------------------ 1 file changed, 30 deletions(-) diff --git a/libgram/src/calibration.c b/libgram/src/calibration.c index ce4b924..2f24113 100644 --- a/libgram/src/calibration.c +++ b/libgram/src/calibration.c @@ -22,36 +22,6 @@ static void set_rdly(const struct gramCtx *ctx, unsigned int phase, unsigned int #endif } -static inline uint32_t lsfr(uint32_t in) { - return (in >> 1) ^ (uint32_t)(0 - (in & 1u) & 0xd0000001); -} - -static bool memtest(uint32_t *start, uint32_t *stop, int delay) { - const uint32_t seed = 0x6C616D62; - uint32_t rand = seed; - volatile uint32_t *ptr; - int i; - - for (ptr = start; ptr < stop; ptr++) { - *ptr = rand; - rand = lsfr(rand); - } - - for (i = 0; i < delay; i++) { - __asm__("nop"); - } - - rand = seed; - for (ptr = start; ptr < stop; ptr++) { - if (*ptr != rand) { - return false; - } - rand = lsfr(rand); - } - - return true; -} - void gram_reset_burstdet(const struct gramCtx *ctx) { #ifdef GRAM_RW_FUNC gram_write(ctx, &(ctx->phy->burstdet), 0); -- 2.30.2