hc
2024-05-10 37f49e37ab4cb5d0bc4c60eb5c6d4dd57db767bb
kernel/drivers/crypto/qce/core.c
....@@ -1,17 +1,10 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * Copyright (c) 2010-2014, The Linux Foundation. All rights reserved.
3
- *
4
- * This program is free software; you can redistribute it and/or modify
5
- * it under the terms of the GNU General Public License version 2 and
6
- * only version 2 as published by the Free Software Foundation.
7
- *
8
- * This program is distributed in the hope that it will be useful,
9
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
10
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
- * GNU General Public License for more details.
124 */
135
146 #include <linux/clk.h>
7
+#include <linux/dma-mapping.h>
158 #include <linux/interrupt.h>
169 #include <linux/module.h>
1710 #include <linux/mod_devicetable.h>
....@@ -30,8 +23,12 @@
3023 #define QCE_QUEUE_LENGTH 1
3124
3225 static const struct qce_algo_ops *qce_ops[] = {
33
- &ablkcipher_ops,
26
+#ifdef CONFIG_CRYPTO_DEV_QCE_SKCIPHER
27
+ &skcipher_ops,
28
+#endif
29
+#ifdef CONFIG_CRYPTO_DEV_QCE_SHA
3430 &ahash_ops,
31
+#endif
3532 };
3633
3734 static void qce_unregister_algs(struct qce_device *qce)
....@@ -175,7 +172,6 @@
175172 {
176173 struct device *dev = &pdev->dev;
177174 struct qce_device *qce;
178
- struct resource *res;
179175 int ret;
180176
181177 qce = devm_kzalloc(dev, sizeof(*qce), GFP_KERNEL);
....@@ -185,8 +181,7 @@
185181 qce->dev = dev;
186182 platform_set_drvdata(pdev, qce);
187183
188
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
189
- qce->base = devm_ioremap_resource(&pdev->dev, res);
184
+ qce->base = devm_platform_ioremap_resource(pdev, 0);
190185 if (IS_ERR(qce->base))
191186 return PTR_ERR(qce->base);
192187