From: Jean THOMAS Date: Fri, 24 Jul 2020 13:13:33 +0000 (+0200) Subject: Expose gram_reset_burstdet and gram_read_burstdet APIs X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=88a1787fd3838a39333f8249c2eb0e6d16124cc7;p=gram.git Expose gram_reset_burstdet and gram_read_burstdet APIs --- diff --git a/libgram/include/gram.h b/libgram/include/gram.h index 7234465..2ba2eb3 100644 --- a/libgram/include/gram.h +++ b/libgram/include/gram.h @@ -3,6 +3,7 @@ #include #include +#include enum GramError { GRAM_ERR_NONE = 0, @@ -34,6 +35,9 @@ extern __attribute__((visibility ("default"))) int gram_memtest(struct gramCtx * extern __attribute__((visibility ("default"))) int gram_calibration_auto(struct gramCtx *ctx); extern __attribute__((visibility ("default"))) void gram_load_calibration(struct gramCtx *ctx, struct gramProfile *profile); +extern __attribute__((visibility ("default"))) void gram_reset_burstdet(struct gramCtx *ctx); +extern __attribute__((visibility ("default"))) bool gram_read_burstdet(struct gramCtx *ctx, int phase); + #ifdef GRAM_RW_FUNC extern uint32_t gram_read(struct gramCtx *ctx, void *addr); extern int gram_write(struct gramCtx *ctx, void *addr, uint32_t value); diff --git a/libgram/src/calibration.c b/libgram/src/calibration.c index 7fd70fb..bcd8c12 100644 --- a/libgram/src/calibration.c +++ b/libgram/src/calibration.c @@ -22,7 +22,7 @@ static void set_rdly(struct gramCtx *ctx, unsigned int phase, unsigned int rdly) #endif } -static void reset_burstdet(struct gramCtx *ctx) { +void gram_reset_burstdet(struct gramCtx *ctx) { #ifdef GRAM_RW_FUNC gram_write(ctx, &(ctx->phy->burstdet), 0); #else @@ -30,7 +30,7 @@ static void reset_burstdet(struct gramCtx *ctx) { #endif } -static bool read_burstdet(struct gramCtx *ctx, int phase) { +bool gram_read_burstdet(struct gramCtx *ctx, int phase) { #ifdef GRAM_RW_FUNC return gram_read(ctx, &(ctx->phy->burstdet)) & (1 << phase); #else