summaryrefslogtreecommitdiffstats
path: root/drivers/crypto/caam/intern.h
diff options
context:
space:
mode:
authorAlex Porosanu <alexandru.porosanu@freescale.com>2013-09-09 17:56:32 +0200
committerHerbert Xu <herbert@gondor.apana.org.au>2013-09-13 13:43:55 +0200
commitb1f996e0b3b00c98f0ac8ffef1a6572cbc735bbc (patch)
tree8f6ecb80263398bef489cc6f7a555230fbcc0531 /drivers/crypto/caam/intern.h
parentcrypto: caam - split RNG4 instantiation function (diff)
downloadlinux-b1f996e0b3b00c98f0ac8ffef1a6572cbc735bbc.tar.xz
linux-b1f996e0b3b00c98f0ac8ffef1a6572cbc735bbc.zip
crypto: caam - uninstantiate RNG state handle 0 if instantiated by caam driver
If the caam driver module instantiates the RNG state handle 0, then upon the removal of the module, the RNG state handle is left initialized. This patch takes care of reverting the state of the handle back to its previous uninstantatied state. 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/intern.h')
-rw-r--r--drivers/crypto/caam/intern.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/crypto/caam/intern.h b/drivers/crypto/caam/intern.h
index 34c4b9f7fbfa..ada24294c729 100644
--- a/drivers/crypto/caam/intern.h
+++ b/drivers/crypto/caam/intern.h
@@ -87,6 +87,12 @@ struct caam_drv_private {
/* list of registered hash algorithms (mk generic context handle?) */
struct list_head hash_list;
+ /* RNG4 block */
+ bool rng4_init; /* If RNG4 block is initialized by this driver,
+ then this will be set; if it was initialized
+ by another entity (e.g. u-boot), it will be
+ cleared. */
+
/*
* debugfs entries for developer view into driver/device
* variables at runtime.