summaryrefslogtreecommitdiff
path: root/include/fsl_sec.h
diff options
context:
space:
mode:
authorAlex Porosanu <alexandru.porosanu@freescale.com>2015-05-05 16:48:35 +0300
committerYork Sun <yorksun@freescale.com>2015-08-03 12:06:37 -0700
commitc4065517362ae9132ceaaec4103ed5ad6c9cfe92 (patch)
tree8097d230210383abf9e40d1b036d1de01c0f8a31 /include/fsl_sec.h
parent17649e1b94b450f1ab0de7fa14553f390285f291 (diff)
downloadu-boot-c4065517362ae9132ceaaec4103ed5ad6c9cfe92.tar.gz
u-boot-c4065517362ae9132ceaaec4103ed5ad6c9cfe92.tar.bz2
u-boot-c4065517362ae9132ceaaec4103ed5ad6c9cfe92.zip
drivers/crypto/fsl: 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> Acked-by: Ruchika Gupta<ruchika.gupta@freescale.com> Reviewed-by: York Sun <yorksun@freescale.com>
Diffstat (limited to 'include/fsl_sec.h')
-rw-r--r--include/fsl_sec.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/fsl_sec.h b/include/fsl_sec.h
index c84b6ad8d8..672bcef2f3 100644
--- a/include/fsl_sec.h
+++ b/include/fsl_sec.h
@@ -32,6 +32,16 @@
/* 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 */