mirror of
https://github.com/Telecominfraproject/wlan-ap.git
synced 2025-12-17 09:21:35 +00:00
57 lines
1.7 KiB
Diff
57 lines
1.7 KiB
Diff
From 19f0a1164fe85b259f1390bd44c3570bc338cc59 Mon Sep 17 00:00:00 2001
|
|
From: Md Sadre Alam <quic_mdalam@quicinc.com>
|
|
Date: Wed, 1 Nov 2023 14:31:45 +0530
|
|
Subject: [PATCH] crypto: qce - Add support for dma address read
|
|
|
|
Add support for dma address read from device tree.
|
|
|
|
Change-Id: I4d62624b22ed93e1c879e9c08cfd6e452f8dd5bb
|
|
Signed-off-by: Md Sadre Alam <quic_mdalam@quicinc.com>
|
|
---
|
|
drivers/crypto/qce/core.c | 8 +++++++-
|
|
drivers/crypto/qce/core.h | 1 +
|
|
2 files changed, 8 insertions(+), 1 deletion(-)
|
|
|
|
diff --git a/drivers/crypto/qce/core.c b/drivers/crypto/qce/core.c
|
|
index 26577f06c729..95086f2ada63 100644
|
|
--- a/drivers/crypto/qce/core.c
|
|
+++ b/drivers/crypto/qce/core.c
|
|
@@ -507,6 +507,7 @@ static int qce_crypto_probe(struct platform_device *pdev)
|
|
{
|
|
struct device *dev = &pdev->dev;
|
|
struct qce_device *qce;
|
|
+ struct resource *res;
|
|
int ret;
|
|
|
|
qce = devm_kzalloc(dev, sizeof(*qce), GFP_KERNEL);
|
|
@@ -524,8 +525,13 @@ static int qce_crypto_probe(struct platform_device *pdev)
|
|
if (ret < 0)
|
|
return ret;
|
|
|
|
- if (device_property_read_bool(dev, "qce,cmd_desc_support"))
|
|
+ if (device_property_read_bool(dev, "qce,cmd_desc_support")) {
|
|
qce->qce_cmd_desc_enable = true;
|
|
+ qce->base_dma = devm_platform_get_and_ioremap_resource(pdev,
|
|
+ 0, &res);
|
|
+ if (dma_mapping_error(dev, nandc->base_dma))
|
|
+ return -ENXIO;
|
|
+ }
|
|
|
|
if (device_property_read_bool(dev, "qce,use_fixed_hw_key"))
|
|
qce->use_fixed_key = true;
|
|
diff --git a/drivers/crypto/qce/core.h b/drivers/crypto/qce/core.h
|
|
index c6284edd209d..c74ed282d255 100644
|
|
--- a/drivers/crypto/qce/core.h
|
|
+++ b/drivers/crypto/qce/core.h
|
|
@@ -95,6 +95,7 @@ struct qce_device {
|
|
bool use_fixed_key;
|
|
struct kobject kobj;
|
|
struct kobject *kobj_parent;
|
|
+ dma_addr_t base_dma;
|
|
bool qce_cmd_desc_enable;
|
|
};
|
|
|
|
--
|
|
2.34.1
|
|
|