summaryrefslogtreecommitdiff
path: root/drivers/crypto/inside-secure/safexcel.h
diff options
context:
space:
mode:
authorAntoine Tenart <antoine.tenart@bootlin.com>2018-06-28 17:15:34 +0200
committerHerbert Xu <herbert@gondor.apana.org.au>2018-07-09 00:30:11 +0800
commit998d2abb0cb343c419c63898a414084ac6c17100 (patch)
tree42ac23a12052e51581db4a3bb9497ee91b8c221f /drivers/crypto/inside-secure/safexcel.h
parentbfda74ad6f507e19923c8870695b25d4247b2727 (diff)
crypto: inside-secure - filter out the algorithms by engine
EIP engines do not support the same set of algorithms. So far the supported engines in the Inside Secure SafeXcel driver support the same set of algorithms, but that won't be true for all engines. This patch adds an 'engines' field in the algorithm definitions so that they only are registered when using a compatible cryptographic engine. Signed-off-by: Antoine Tenart <antoine.tenart@bootlin.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/crypto/inside-secure/safexcel.h')
-rw-r--r--drivers/crypto/inside-secure/safexcel.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/crypto/inside-secure/safexcel.h b/drivers/crypto/inside-secure/safexcel.h
index 6e6bdad6a6f5..b79cb36b3772 100644
--- a/drivers/crypto/inside-secure/safexcel.h
+++ b/drivers/crypto/inside-secure/safexcel.h
@@ -529,8 +529,8 @@ struct safexcel_work_data {
};
enum safexcel_eip_version {
- EIP97IES,
- EIP197B,
+ EIP97IES = BIT(0),
+ EIP197B = BIT(1),
};
struct safexcel_register_offsets {
@@ -624,6 +624,7 @@ struct safexcel_ahash_export_state {
struct safexcel_alg_template {
struct safexcel_crypto_priv *priv;
enum safexcel_alg_type type;
+ u32 engines;
union {
struct skcipher_alg skcipher;
struct aead_alg aead;