summaryrefslogtreecommitdiff
path: root/drivers/crypto
diff options
context:
space:
mode:
authorVictoria Milhoan <vicki.milhoan@freescale.com>2014-11-12 09:58:24 -0700
committerNitin Garg <nitin.garg@nxp.com>2016-01-20 14:28:35 -0600
commit5ff8995f00237fd4c915b3b10c7887a8a002a9a3 (patch)
treefc6401f2b5cffa2b014eadd77962792d68233e45 /drivers/crypto
parent7c2ae0cde8de7529e3a03ab34725d5773a59234d (diff)
MLK-9769-9 Adjust RNG timing to support more devices
Adjust RNG timing parameters to support more i.MX6 devices. Signed-off-by: Victoria Milhoan <vicki.milhoan@freescale.com> Signed-off-by: Dan Douglass <dan.douglass@freescale.com>
Diffstat (limited to 'drivers/crypto')
-rw-r--r--drivers/crypto/caam/ctrl.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/crypto/caam/ctrl.c b/drivers/crypto/caam/ctrl.c
index ade7166bd86f..e404b84199a7 100644
--- a/drivers/crypto/caam/ctrl.c
+++ b/drivers/crypto/caam/ctrl.c
@@ -359,8 +359,8 @@ static void kick_trng(struct platform_device *pdev, 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);
/*
@@ -368,6 +368,7 @@ static void kick_trng(struct platform_device *pdev, int ent_delay)
* and statistical checker
*/
setbits32(&val, RTMCTL_SAMP_MODE_RAW_ES_SC);
+
/* put RNG4 into run mode */
clrbits32(&val, RTMCTL_PRGM);
/* write back the control register */