.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
---|
1 | 2 | /* |
---|
2 | 3 | * 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. |
---|
12 | 4 | */ |
---|
13 | 5 | |
---|
14 | 6 | #include <linux/clk.h> |
---|
| 7 | +#include <linux/dma-mapping.h> |
---|
15 | 8 | #include <linux/interrupt.h> |
---|
16 | 9 | #include <linux/module.h> |
---|
17 | 10 | #include <linux/mod_devicetable.h> |
---|
.. | .. |
---|
30 | 23 | #define QCE_QUEUE_LENGTH 1 |
---|
31 | 24 | |
---|
32 | 25 | 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 |
---|
34 | 30 | &ahash_ops, |
---|
| 31 | +#endif |
---|
35 | 32 | }; |
---|
36 | 33 | |
---|
37 | 34 | static void qce_unregister_algs(struct qce_device *qce) |
---|
.. | .. |
---|
175 | 172 | { |
---|
176 | 173 | struct device *dev = &pdev->dev; |
---|
177 | 174 | struct qce_device *qce; |
---|
178 | | - struct resource *res; |
---|
179 | 175 | int ret; |
---|
180 | 176 | |
---|
181 | 177 | qce = devm_kzalloc(dev, sizeof(*qce), GFP_KERNEL); |
---|
.. | .. |
---|
185 | 181 | qce->dev = dev; |
---|
186 | 182 | platform_set_drvdata(pdev, qce); |
---|
187 | 183 | |
---|
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); |
---|
190 | 185 | if (IS_ERR(qce->base)) |
---|
191 | 186 | return PTR_ERR(qce->base); |
---|
192 | 187 | |
---|