diff options
author | Alex Porosanu <alexandru.porosanu@freescale.com> | 2014-08-11 08:40:17 (GMT) |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2014-08-25 12:32:37 (GMT) |
commit | e5ffbfc182bc148f44840bdd3970ea4c8bf80c3c (patch) | |
tree | 0e9673d21a24695118b8ac4d15907f92b5e11b9f /drivers/crypto/caam/regs.h | |
parent | eeaa1724a2e9c8958a8621b3c10d5ca0667e78fa (diff) | |
download | linux-e5ffbfc182bc148f44840bdd3970ea4c8bf80c3c.tar.xz |
crypto: caam - enable raw data instead of von Neumann data
The sampling of the oscillator can be done in multiple modes for
generating the entropy value. By default, this is set to von
Neumann. This patch changes the sampling to raw data, since it
has been discovered that the generated entropy has a better
'quality'.
Signed-off-by: Alex Porosanu <alexandru.porosanu@freescale.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/crypto/caam/regs.h')
-rw-r--r-- | drivers/crypto/caam/regs.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/crypto/caam/regs.h b/drivers/crypto/caam/regs.h index 5fa739c..bc9cd62 100644 --- a/drivers/crypto/caam/regs.h +++ b/drivers/crypto/caam/regs.h @@ -269,6 +269,16 @@ struct rngtst { /* RNG4 TRNG test registers */ struct rng4tst { #define RTMCTL_PRGM 0x00010000 /* 1 -> program mode, 0 -> run mode */ +#define RTMCTL_SAMP_MODE_VON_NEUMANN_ES_SC 0 /* use von Neumann data in + both entropy shifter and + statistical checker */ +#define RTMCTL_SAMP_MODE_RAW_ES_SC 1 /* use raw data in both + entropy shifter and + statistical checker */ +#define RTMCTL_SAMP_MODE_VON_NEUMANN_ES_RAW_SC 2 /* use von Neumann data in + entropy shifter, raw data + in statistical checker */ +#define RTMCTL_SAMP_MODE_INVALID 3 /* invalid combination */ u32 rtmctl; /* misc. control register */ u32 rtscmisc; /* statistical check misc. register */ u32 rtpkrrng; /* poker range register */ |