summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorGary R Hook <gary.hook@amd.com>2016-07-27 03:10:40 +0300
committerHerbert Xu <herbert@gondor.apana.org.au>2016-08-09 13:47:18 +0300
commit99d90b2ebd8b327c0c496798db99009b30c70945 (patch)
treed69024c77550e6c0e4b4022057f10745705d1bca /drivers
parent084935b208f6507ef5214fd67052a67a700bc6cf (diff)
downloadlinux-99d90b2ebd8b327c0c496798db99009b30c70945.tar.xz
crypto: ccp - Enable DMA service on a v5 CCP
Every CCP is capable of providing general DMA services. Register the device as a provider. Signed-off-by: Gary R Hook <gary.hook@amd.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/crypto/ccp/ccp-dev-v5.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/crypto/ccp/ccp-dev-v5.c b/drivers/crypto/ccp/ccp-dev-v5.c
index ddce2205e5fa..40867141aea8 100644
--- a/drivers/crypto/ccp/ccp-dev-v5.c
+++ b/drivers/crypto/ccp/ccp-dev-v5.c
@@ -832,6 +832,11 @@ static int ccp5_init(struct ccp_device *ccp)
if (ret)
goto e_kthread;
+ /* Register the DMA engine support */
+ ret = ccp_dmaengine_register(ccp);
+ if (ret)
+ goto e_hwrng;
+
return 0;
e_kthread:
@@ -856,6 +861,9 @@ static void ccp5_destroy(struct ccp_device *ccp)
struct ccp_cmd *cmd;
unsigned int i;
+ /* Unregister the DMA engine */
+ ccp_dmaengine_unregister(ccp);
+
/* Unregister the RNG */
ccp_unregister_rng(ccp);