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>
This commit is contained in:
Antoine Tenart
2018-06-28 17:15:34 +02:00
committed by Herbert Xu
parent bfda74ad6f
commit 998d2abb0c
4 changed files with 29 additions and 2 deletions

View File

@@ -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;