linux/drivers/crypto/caam
Alex Porosanu 84cf48278b crypto: caam - fix RNG4 instantiation
The RNG4 block in CAAM needs to be 'seeded' first before being used
for generating pseudo-random data. The 'seeding' is done by getting
entropy from the TRNG ring oscillator. The RTFRQMAX register controls
the maximum allowable number of samples that can be aquired during
an entropy sample. Depending on the clock at which the RNG4 block
(and for that matter the SEC block) runs, it's possible that a
hard-coded value for the maximum frequency is inadequate, i.e. more
samples than needed are taken. This is an error, and thus the RNG4
block doesn't get initialized.  The patch attempts to alleviate
this issue by trying with progressivly larger frequencies, until
the number of samples is adequate.
This patch also fixes how a descriptor is deemed as being finished:
instead of checking the VALID field in the DECO debug register,
it makes sure that the DECO is idle, by checking the DECO state field
of the said register.

Signed-off-by: Alex Porosanu <alexandru.porosanu@freescale.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2013-09-13 21:43:54 +10:00
..
caamalg.c crypto: caam - fix hash, alg and rng registration if CAAM driver not initialized 2013-09-13 21:43:54 +10:00
caamhash.c crypto: caam - fix hash, alg and rng registration if CAAM driver not initialized 2013-09-13 21:43:54 +10:00
caamrng.c crypto: caam - fix hash, alg and rng registration if CAAM driver not initialized 2013-09-13 21:43:54 +10:00
compat.h Revert "crypto: caam - add IPsec ESN support" 2013-03-21 17:36:03 +08:00
ctrl.c crypto: caam - fix RNG4 instantiation 2013-09-13 21:43:54 +10:00
ctrl.h crypto: caam - ERA retrieval and printing for SEC device 2012-07-11 11:06:11 +08:00
desc_constr.h crypto: caam - Moved macro DESC_JOB_IO_LEN to desc_constr.h 2013-07-10 16:53:28 +10:00
desc.h crypto: caam - add missing flag for the LOAD/STORE commands 2013-05-28 15:37:08 +08:00
error.c crypto: caam - static constify error data 2013-04-25 21:01:43 +08:00
error.h crypto: caam - fix printk recursion for long error texts 2011-05-04 15:15:06 +10:00
intern.h crypto: caam - Remove unused functions from Job Ring 2013-08-01 10:55:40 +10:00
jr.c crypto: caam - Remove unused functions from Job Ring 2013-08-01 10:55:40 +10:00
jr.h crypto: caam - Remove unused functions from Job Ring 2013-08-01 10:55:40 +10:00
Kconfig crypto: caam - add option for enabling DEBUG mode 2013-08-21 21:08:37 +10:00
key_gen.c crypto: caam - replace xstr macro with __stringify 2013-08-21 21:08:36 +10:00
key_gen.h crypto: caam - change key gen functions to return signed int 2013-04-25 21:01:43 +08:00
Makefile crypto: caam - add option for enabling DEBUG mode 2013-08-21 21:08:37 +10:00
pdb.h crypto: caam - Add define for Adjust Output Frame Length in PDB 2013-05-28 15:37:08 +08:00
regs.h crypto: caam - fix RNG4 instantiation 2013-09-13 21:43:54 +10:00
sg_sw_sec4.h crypto: caam - chaining support 2012-06-27 14:42:05 +08:00