diff options
author | Gilad Ben-Yossef <gilad@benyossef.com> | 2018-01-22 12:27:03 +0300 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2018-02-15 18:26:42 +0300 |
commit | ff27e85a85bbde19589f775297db92ff925e5981 (patch) | |
tree | 9ae7d4858b55898b41f48833c9e02136975b7602 /drivers/crypto/ccree/cc_driver.c | |
parent | 63893811b0fcb52f6eaf9811cc08bddd46f81c3e (diff) | |
download | linux-ff27e85a85bbde19589f775297db92ff925e5981.tar.xz |
crypto: ccree - add AEAD support
Add CryptoCell AEAD support
Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/crypto/ccree/cc_driver.c')
-rw-r--r-- | drivers/crypto/ccree/cc_driver.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/crypto/ccree/cc_driver.c b/drivers/crypto/ccree/cc_driver.c index 6e32de90b38f..8a530a45be2e 100644 --- a/drivers/crypto/ccree/cc_driver.c +++ b/drivers/crypto/ccree/cc_driver.c @@ -20,6 +20,7 @@ #include "cc_buffer_mgr.h" #include "cc_debugfs.h" #include "cc_cipher.h" +#include "cc_aead.h" #include "cc_hash.h" #include "cc_ivgen.h" #include "cc_sram_mgr.h" @@ -294,8 +295,16 @@ static int init_cc_resources(struct platform_device *plat_dev) goto post_cipher_err; } + rc = cc_aead_alloc(new_drvdata); + if (rc) { + dev_err(dev, "cc_aead_alloc failed\n"); + goto post_hash_err; + } + return 0; +post_hash_err: + cc_hash_free(new_drvdata); post_cipher_err: cc_cipher_free(new_drvdata); post_ivgen_err: @@ -328,6 +337,7 @@ static void cleanup_cc_resources(struct platform_device *plat_dev) struct cc_drvdata *drvdata = (struct cc_drvdata *)platform_get_drvdata(plat_dev); + cc_aead_free(drvdata); cc_hash_free(drvdata); cc_cipher_free(drvdata); cc_ivgen_fini(drvdata); |