crypto: caam - adjust RNG timing to support more devices
[linux-2.6-microblaze.git] / drivers / crypto / caam / ctrl.c
index af0db18..ee6478e 100644 (file)
@@ -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: