summaryrefslogtreecommitdiffstats
path: root/drivers/crypto/caam/intern.h
diff options
context:
space:
mode:
authorAlex Porosanu2013-09-09 17:56:34 +0200
committerHerbert Xu2013-09-13 13:43:56 +0200
commit1005bccd7a4a6345d995449b77cb1ba748ff9a28 (patch)
tree7b3dd00c93771213cf002e19280e2f422c6eee4f /drivers/crypto/caam/intern.h
parentcrypto: caam - fix RNG4 AAI defines (diff)
downloadkernel-qcow2-linux-1005bccd7a4a6345d995449b77cb1ba748ff9a28.tar.gz
kernel-qcow2-linux-1005bccd7a4a6345d995449b77cb1ba748ff9a28.tar.xz
kernel-qcow2-linux-1005bccd7a4a6345d995449b77cb1ba748ff9a28.zip
crypto: caam - enable instantiation of all RNG4 state handles
RNG4 block contains multiple (i.e. 2) state handles that can be initialized. This patch adds the necessary code for detecting which of the two state handles has been instantiated by another piece of software e.g. u-boot and instantiate the other one (or both if none was instantiated). Only the state handle(s) instantiated by this driver will be deinstantiated when removing the module. 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.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/crypto/caam/intern.h b/drivers/crypto/caam/intern.h
index ada24294c729..bbc1ac9ec720 100644
--- a/drivers/crypto/caam/intern.h
+++ b/drivers/crypto/caam/intern.h
@@ -87,11 +87,11 @@ struct caam_drv_private {
/* list of registered hash algorithms (mk generic context handle?) */
struct list_head hash_list;
+#define RNG4_MAX_HANDLES 2
/* 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. */
+ u32 rng4_sh_init; /* This bitmap shows which of the State
+ Handles of the RNG4 block are initialized
+ by this driver */
/*
* debugfs entries for developer view into driver/device