aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/crypto/caam/regs.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/crypto/caam/regs.h')
-rw-r--r--drivers/crypto/caam/regs.h32
1 files changed, 30 insertions, 2 deletions
diff --git a/drivers/crypto/caam/regs.h b/drivers/crypto/caam/regs.h
index e9f7a70cdd5e..6d9f1d982970 100644
--- a/drivers/crypto/caam/regs.h
+++ b/drivers/crypto/caam/regs.h
@@ -167,7 +167,7 @@ struct partid {
167 u32 pidr; /* partition ID, DECO */ 167 u32 pidr; /* partition ID, DECO */
168}; 168};
169 169
170/* RNG test mode (replicated twice in some configurations) */ 170/* RNGB test mode (replicated twice in some configurations) */
171/* Padded out to 0x100 */ 171/* Padded out to 0x100 */
172struct rngtst { 172struct rngtst {
173 u32 mode; /* RTSTMODEx - Test mode */ 173 u32 mode; /* RTSTMODEx - Test mode */
@@ -200,6 +200,31 @@ struct rngtst {
200 u32 rsvd14[15]; 200 u32 rsvd14[15];
201}; 201};
202 202
203/* RNG4 TRNG test registers */
204struct rng4tst {
205#define RTMCTL_PRGM 0x00010000 /* 1 -> program mode, 0 -> run mode */
206 u32 rtmctl; /* misc. control register */
207 u32 rtscmisc; /* statistical check misc. register */
208 u32 rtpkrrng; /* poker range register */
209 union {
210 u32 rtpkrmax; /* PRGM=1: poker max. limit register */
211 u32 rtpkrsq; /* PRGM=0: poker square calc. result register */
212 };
213#define RTSDCTL_ENT_DLY_SHIFT 16
214#define RTSDCTL_ENT_DLY_MASK (0xffff << RTSDCTL_ENT_DLY_SHIFT)
215 u32 rtsdctl; /* seed control register */
216 union {
217 u32 rtsblim; /* PRGM=1: sparse bit limit register */
218 u32 rttotsam; /* PRGM=0: total samples register */
219 };
220 u32 rtfrqmin; /* frequency count min. limit register */
221 union {
222 u32 rtfrqmax; /* PRGM=1: freq. count max. limit register */
223 u32 rtfrqcnt; /* PRGM=0: freq. count register */
224 };
225 u32 rsvd1[56];
226};
227
203/* 228/*
204 * caam_ctrl - basic core configuration 229 * caam_ctrl - basic core configuration
205 * starts base + 0x0000 padded out to 0x1000 230 * starts base + 0x0000 padded out to 0x1000
@@ -249,7 +274,10 @@ struct caam_ctrl {
249 274
250 /* RNG Test/Verification/Debug Access 600-7ff */ 275 /* RNG Test/Verification/Debug Access 600-7ff */
251 /* (Useful in Test/Debug modes only...) */ 276 /* (Useful in Test/Debug modes only...) */
252 struct rngtst rtst[2]; 277 union {
278 struct rngtst rtst[2];
279 struct rng4tst r4tst[2];
280 };
253 281
254 u32 rsvd9[448]; 282 u32 rsvd9[448];
255 283