diff options
Diffstat (limited to 'drivers/crypto')
-rw-r--r-- | drivers/crypto/Kconfig | 1 | ||||
-rw-r--r-- | drivers/crypto/nx/nx-842.c | 20 | ||||
-rw-r--r-- | drivers/crypto/nx/nx.c | 1 | ||||
-rw-r--r-- | drivers/crypto/omap-aes.c | 8 | ||||
-rw-r--r-- | drivers/crypto/omap-sham.c | 10 | ||||
-rw-r--r-- | drivers/crypto/picoxcell_crypto.c | 1 | ||||
-rw-r--r-- | drivers/crypto/s5p-sss.c | 2 | ||||
-rw-r--r-- | drivers/crypto/talitos.c | 3 | ||||
-rw-r--r-- | drivers/crypto/tegra-aes.c | 12 | ||||
-rw-r--r-- | drivers/crypto/ux500/cryp/cryp_core.c | 3 |
10 files changed, 22 insertions, 39 deletions
diff --git a/drivers/crypto/Kconfig b/drivers/crypto/Kconfig index f6644f59fd9d..87ec4d027c25 100644 --- a/drivers/crypto/Kconfig +++ b/drivers/crypto/Kconfig @@ -254,6 +254,7 @@ config CRYPTO_DEV_OMAP_AES tristate "Support for OMAP AES hw engine" depends on ARCH_OMAP2 || ARCH_OMAP3 select CRYPTO_AES + select CRYPTO_BLKCIPHER2 help OMAP processors have AES module accelerator. Select this if you want to use the OMAP module for AES algorithms. diff --git a/drivers/crypto/nx/nx-842.c b/drivers/crypto/nx/nx-842.c index 0ce625738677..6c4c000671c5 100644 --- a/drivers/crypto/nx/nx-842.c +++ b/drivers/crypto/nx/nx-842.c @@ -28,7 +28,6 @@ #include <linux/slab.h> #include <asm/page.h> -#include <asm/pSeries_reconfig.h> #include <asm/vio.h> #include "nx_csbcpb.h" /* struct nx_csbcpb */ @@ -1014,26 +1013,23 @@ error_out: * NOTIFY_BAD encoded with error number on failure, use * notifier_to_errno() to decode this value */ -static int nx842_OF_notifier(struct notifier_block *np, - unsigned long action, - void *update) +static int nx842_OF_notifier(struct notifier_block *np, unsigned long action, + void *update) { - struct pSeries_reconfig_prop_update *upd; + struct of_prop_reconfig *upd = update; struct nx842_devdata *local_devdata; struct device_node *node = NULL; - upd = (struct pSeries_reconfig_prop_update *)update; - rcu_read_lock(); local_devdata = rcu_dereference(devdata); if (local_devdata) node = local_devdata->dev->of_node; if (local_devdata && - action == PSERIES_UPDATE_PROPERTY && - !strcmp(upd->node->name, node->name)) { + action == OF_RECONFIG_UPDATE_PROPERTY && + !strcmp(upd->dn->name, node->name)) { rcu_read_unlock(); - nx842_OF_upd(upd->property); + nx842_OF_upd(upd->prop); } else rcu_read_unlock(); @@ -1182,7 +1178,7 @@ static int __init nx842_probe(struct vio_dev *viodev, synchronize_rcu(); kfree(old_devdata); - pSeries_reconfig_notifier_register(&nx842_of_nb); + of_reconfig_notifier_register(&nx842_of_nb); ret = nx842_OF_upd(NULL); if (ret && ret != -ENODEV) { @@ -1228,7 +1224,7 @@ static int __exit nx842_remove(struct vio_dev *viodev) spin_lock_irqsave(&devdata_mutex, flags); old_devdata = rcu_dereference_check(devdata, lockdep_is_held(&devdata_mutex)); - pSeries_reconfig_notifier_unregister(&nx842_of_nb); + of_reconfig_notifier_unregister(&nx842_of_nb); rcu_assign_pointer(devdata, NULL); spin_unlock_irqrestore(&devdata_mutex, flags); synchronize_rcu(); diff --git a/drivers/crypto/nx/nx.c b/drivers/crypto/nx/nx.c index 638110efae9b..f7a8a16aa7d3 100644 --- a/drivers/crypto/nx/nx.c +++ b/drivers/crypto/nx/nx.c @@ -33,7 +33,6 @@ #include <linux/scatterlist.h> #include <linux/device.h> #include <linux/of.h> -#include <asm/pSeries_reconfig.h> #include <asm/hvcall.h> #include <asm/vio.h> diff --git a/drivers/crypto/omap-aes.c b/drivers/crypto/omap-aes.c index 093a8af59cbe..e66e8ee5a9af 100644 --- a/drivers/crypto/omap-aes.c +++ b/drivers/crypto/omap-aes.c @@ -29,8 +29,7 @@ #include <crypto/scatterwalk.h> #include <crypto/aes.h> -#include <plat/cpu.h> -#include <plat/dma.h> +#include <linux/omap-dma.h> /* OMAP TRM gives bitfields as start:end, where start is the higher bit number. For example 7:0 */ @@ -941,11 +940,6 @@ static int __init omap_aes_mod_init(void) { pr_info("loading %s driver\n", "omap-aes"); - if (!cpu_class_is_omap2() || omap_type() != OMAP2_DEVICE_TYPE_SEC) { - pr_err("Unsupported cpu\n"); - return -ENODEV; - } - return platform_driver_register(&omap_aes_driver); } diff --git a/drivers/crypto/omap-sham.c b/drivers/crypto/omap-sham.c index a3fd6fc504b1..1d75e6f95a58 100644 --- a/drivers/crypto/omap-sham.c +++ b/drivers/crypto/omap-sham.c @@ -37,8 +37,7 @@ #include <crypto/hash.h> #include <crypto/internal/hash.h> -#include <plat/cpu.h> -#include <plat/dma.h> +#include <linux/omap-dma.h> #include <mach/irqs.h> #define SHA_REG_DIGEST(x) (0x00 + ((x) * 0x04)) @@ -1289,13 +1288,6 @@ static int __init omap_sham_mod_init(void) { pr_info("loading %s driver\n", "omap-sham"); - if (!cpu_class_is_omap2() || - (omap_type() != OMAP2_DEVICE_TYPE_SEC && - omap_type() != OMAP2_DEVICE_TYPE_EMU)) { - pr_err("Unsupported cpu\n"); - return -ENODEV; - } - return platform_driver_register(&omap_sham_driver); } diff --git a/drivers/crypto/picoxcell_crypto.c b/drivers/crypto/picoxcell_crypto.c index 410a03c01ca4..c983f869d2b7 100644 --- a/drivers/crypto/picoxcell_crypto.c +++ b/drivers/crypto/picoxcell_crypto.c @@ -1863,6 +1863,7 @@ static int __devexit spacc_remove(struct platform_device *pdev) static const struct platform_device_id spacc_id_table[] = { { "picochip,spacc-ipsec", }, { "picochip,spacc-l2", }, + { } }; static struct platform_driver spacc_driver = { diff --git a/drivers/crypto/s5p-sss.c b/drivers/crypto/s5p-sss.c index a22714412cda..49ad8cbade69 100644 --- a/drivers/crypto/s5p-sss.c +++ b/drivers/crypto/s5p-sss.c @@ -30,7 +30,7 @@ #include <crypto/ctr.h> #include <plat/cpu.h> -#include <plat/dma.h> +#include <mach/dma.h> #define _SBF(s, v) ((v) << (s)) #define _BIT(b) _SBF(b, 1) diff --git a/drivers/crypto/talitos.c b/drivers/crypto/talitos.c index da1112765a44..09b184adf31b 100644 --- a/drivers/crypto/talitos.c +++ b/drivers/crypto/talitos.c @@ -936,8 +936,7 @@ static int sg_to_link_tbl(struct scatterlist *sg, int sg_count, sg_count--; link_tbl_ptr--; } - link_tbl_ptr->len = cpu_to_be16(be16_to_cpu(link_tbl_ptr->len) - + cryptlen); + be16_add_cpu(&link_tbl_ptr->len, cryptlen); /* tag end of link table */ link_tbl_ptr->j_extent = DESC_PTR_LNKTBL_RETURN; diff --git a/drivers/crypto/tegra-aes.c b/drivers/crypto/tegra-aes.c index 37185e6630cd..eb32fd8cad14 100644 --- a/drivers/crypto/tegra-aes.c +++ b/drivers/crypto/tegra-aes.c @@ -41,8 +41,6 @@ #include <linux/completion.h> #include <linux/workqueue.h> -#include <mach/clk.h> - #include <crypto/scatterwalk.h> #include <crypto/aes.h> #include <crypto/internal/rng.h> @@ -674,8 +672,10 @@ static int tegra_aes_get_random(struct crypto_rng *tfm, u8 *rdata, mutex_lock(&aes_lock); ret = clk_prepare_enable(dd->aes_clk); - if (ret) + if (ret) { + mutex_unlock(&aes_lock); return ret; + } ctx->dd = dd; dd->ctx = ctx; @@ -759,8 +759,10 @@ static int tegra_aes_rng_reset(struct crypto_rng *tfm, u8 *seed, dd->flags = FLAGS_ENCRYPT | FLAGS_RNG; ret = clk_prepare_enable(dd->aes_clk); - if (ret) + if (ret) { + mutex_unlock(&aes_lock); return ret; + } aes_set_key(dd); @@ -1031,7 +1033,7 @@ out: if (dd->buf_out) dma_free_coherent(dev, AES_HW_DMA_BUFFER_SIZE_BYTES, dd->buf_out, dd->dma_buf_out); - if (IS_ERR(dd->aes_clk)) + if (!IS_ERR(dd->aes_clk)) clk_put(dd->aes_clk); if (aes_wq) destroy_workqueue(aes_wq); diff --git a/drivers/crypto/ux500/cryp/cryp_core.c b/drivers/crypto/ux500/cryp/cryp_core.c index bc615cc56266..8bc5fef07e7a 100644 --- a/drivers/crypto/ux500/cryp/cryp_core.c +++ b/drivers/crypto/ux500/cryp/cryp_core.c @@ -23,6 +23,7 @@ #include <linux/platform_device.h> #include <linux/regulator/consumer.h> #include <linux/semaphore.h> +#include <linux/platform_data/dma-ste-dma40.h> #include <crypto/aes.h> #include <crypto/algapi.h> @@ -30,8 +31,6 @@ #include <crypto/des.h> #include <crypto/scatterwalk.h> -#include <plat/ste_dma40.h> - #include <linux/platform_data/crypto-ux500.h> #include <mach/hardware.h> |