summaryrefslogtreecommitdiffstats
path: root/drivers/crypto/xilinx
diff options
context:
space:
mode:
authorRajan Vaja <rajan.vaja@xilinx.com>2020-04-24 13:58:01 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-04-28 15:45:09 +0200
commitbc86f9c546160afce631fae223c3772d9375ee25 (patch)
treebdfbe9468f93906210c0ab2dd5bddd57509a48c3 /drivers/crypto/xilinx
parentcbbbda71fe37fe70e610d5ec3977fc6a096280ed (diff)
downloadlinux-bc86f9c546160afce631fae223c3772d9375ee25.tar.bz2
firmware: xilinx: Remove eemi ops for aes engine
Use direct function call for aes engine instead of using eemi ops. Signed-off-by: Rajan Vaja <rajan.vaja@xilinx.com> Signed-off-by: Jolly Shah <jolly.shah@xilinx.com> Link: https://lore.kernel.org/r/1587761887-4279-20-git-send-email-jolly.shah@xilinx.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/crypto/xilinx')
-rw-r--r--drivers/crypto/xilinx/zynqmp-aes-gcm.c12
1 files changed, 1 insertions, 11 deletions
diff --git a/drivers/crypto/xilinx/zynqmp-aes-gcm.c b/drivers/crypto/xilinx/zynqmp-aes-gcm.c
index 09f7f468eef8..d0a0daf3ea08 100644
--- a/drivers/crypto/xilinx/zynqmp-aes-gcm.c
+++ b/drivers/crypto/xilinx/zynqmp-aes-gcm.c
@@ -46,7 +46,6 @@ struct zynqmp_aead_drv_ctx {
} alg;
struct device *dev;
struct crypto_engine *engine;
- const struct zynqmp_eemi_ops *eemi_ops;
};
struct zynqmp_aead_hw_req {
@@ -92,9 +91,6 @@ static int zynqmp_aes_aead_cipher(struct aead_request *req)
drv_ctx = container_of(alg, struct zynqmp_aead_drv_ctx, alg.aead);
- if (!drv_ctx->eemi_ops->aes)
- return -ENOTSUPP;
-
if (tfm_ctx->keysrc == ZYNQMP_AES_KUP_KEY)
dma_size = req->cryptlen + ZYNQMP_AES_KEY_SIZE
+ GCM_AES_IV_SIZE;
@@ -136,7 +132,7 @@ static int zynqmp_aes_aead_cipher(struct aead_request *req)
hwreq->key = 0;
}
- drv_ctx->eemi_ops->aes(dma_addr_hw_req, &status);
+ zynqmp_pm_aes_engine(dma_addr_hw_req, &status);
if (status) {
switch (status) {
@@ -388,12 +384,6 @@ static int zynqmp_aes_aead_probe(struct platform_device *pdev)
else
return -ENODEV;
- aes_drv_ctx.eemi_ops = zynqmp_pm_get_eemi_ops();
- if (IS_ERR(aes_drv_ctx.eemi_ops)) {
- dev_err(dev, "Failed to get ZynqMP EEMI interface\n");
- return PTR_ERR(aes_drv_ctx.eemi_ops);
- }
-
err = dma_set_mask_and_coherent(dev, DMA_BIT_MASK(ZYNQMP_DMA_BIT_MASK));
if (err < 0) {
dev_err(dev, "No usable DMA configuration\n");