From: Victoria Milhoan Date: Mon, 12 Jun 2023 08:26:15 +0000 (+0200) Subject: crypto: caam - adjust RNG timing to support more devices X-Git-Tag: v6.6.7~2481^2~23 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ef492d080302913e85122a2d92efa2ca174930f8;p=platform%2Fkernel%2Flinux-starfive.git crypto: caam - adjust RNG timing to support more devices Adjust RNG timing parameters to support more i.MX6 devices. Signed-off-by: Victoria Milhoan Signed-off-by: Dan Douglass Signed-off-by: Vipul Kumar Signed-off-by: Horia Geantă Reviewed-by: Gaurav Jain Signed-off-by: Herbert Xu --- diff --git a/drivers/crypto/caam/ctrl.c b/drivers/crypto/caam/ctrl.c index af0db18..ee6478e 100644 --- a/drivers/crypto/caam/ctrl.c +++ b/drivers/crypto/caam/ctrl.c @@ -389,8 +389,8 @@ static void kick_trng(struct device *dev, int ent_delay) wr_reg32(&r4tst->rtsdctl, val); /* min. freq. count, equal to 1/4 of the entropy sample length */ wr_reg32(&r4tst->rtfrqmin, ent_delay >> 2); - /* disable maximum frequency count */ - wr_reg32(&r4tst->rtfrqmax, RTFRQMAX_DISABLE); + /* max. freq. count, equal to 16 times the entropy sample length */ + wr_reg32(&r4tst->rtfrqmax, ent_delay << 4); /* read the control register */ val = rd_reg32(&r4tst->rtmctl); start_rng: