aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/crypto/inside-secure/safexcel.c
diff options
context:
space:
mode:
authorAntoine Tenart <antoine.tenart@bootlin.com>2018-03-19 09:21:20 +0100
committerHerbert Xu <herbert@gondor.apana.org.au>2018-03-31 01:32:48 +0800
commit73f36ea703219115957a6a9f5dbe9d92b954eea4 (patch)
tree1828ee0d19217630f8d440ad1b98ce34a15be826 /drivers/crypto/inside-secure/safexcel.c
parentcrypto: inside-secure - the context ipad/opad should use the state sz (diff)
downloadlinux-dev-73f36ea703219115957a6a9f5dbe9d92b954eea4.tar.xz
linux-dev-73f36ea703219115957a6a9f5dbe9d92b954eea4.zip
crypto: inside-secure - hmac(sha256) support
This patch adds the hmac(sha256) support to the Inside Secure cryptographic engine driver. 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.c')
-rw-r--r--drivers/crypto/inside-secure/safexcel.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/crypto/inside-secure/safexcel.c b/drivers/crypto/inside-secure/safexcel.c
index f7d7293de699..33595f41586f 100644
--- a/drivers/crypto/inside-secure/safexcel.c
+++ b/drivers/crypto/inside-secure/safexcel.c
@@ -354,7 +354,7 @@ static int safexcel_hw_init(struct safexcel_crypto_priv *priv)
val |= EIP197_PROTOCOL_ENCRYPT_ONLY | EIP197_PROTOCOL_HASH_ONLY;
val |= EIP197_ALG_AES_ECB | EIP197_ALG_AES_CBC;
val |= EIP197_ALG_SHA1 | EIP197_ALG_HMAC_SHA1;
- val |= EIP197_ALG_SHA2;
+ val |= EIP197_ALG_SHA2 | EIP197_ALG_HMAC_SHA2;
writel(val, EIP197_PE(priv) + EIP197_PE_EIP96_FUNCTION_EN);
/* Command Descriptor Rings prepare */
@@ -768,6 +768,7 @@ static struct safexcel_alg_template *safexcel_algs[] = {
&safexcel_alg_sha224,
&safexcel_alg_sha256,
&safexcel_alg_hmac_sha1,
+ &safexcel_alg_hmac_sha256,
};
static int safexcel_register_algorithms(struct safexcel_crypto_priv *priv)