diff options
Diffstat (limited to 'drivers/crypto')
-rw-r--r-- | drivers/crypto/Kconfig | 2 | ||||
-rw-r--r-- | drivers/crypto/ixp4xx_crypto.c | 12 | ||||
-rw-r--r-- | drivers/crypto/omap-aes.c | 8 | ||||
-rw-r--r-- | drivers/crypto/omap-sham.c | 10 |
4 files changed, 9 insertions, 23 deletions
diff --git a/drivers/crypto/Kconfig b/drivers/crypto/Kconfig index 308c7fb92a60..f6644f59fd9d 100644 --- a/drivers/crypto/Kconfig +++ b/drivers/crypto/Kconfig | |||
@@ -224,7 +224,7 @@ config CRYPTO_DEV_TALITOS | |||
224 | 224 | ||
225 | config CRYPTO_DEV_IXP4XX | 225 | config CRYPTO_DEV_IXP4XX |
226 | tristate "Driver for IXP4xx crypto hardware acceleration" | 226 | tristate "Driver for IXP4xx crypto hardware acceleration" |
227 | depends on ARCH_IXP4XX | 227 | depends on ARCH_IXP4XX && IXP4XX_QMGR && IXP4XX_NPE |
228 | select CRYPTO_DES | 228 | select CRYPTO_DES |
229 | select CRYPTO_ALGAPI | 229 | select CRYPTO_ALGAPI |
230 | select CRYPTO_AUTHENC | 230 | select CRYPTO_AUTHENC |
diff --git a/drivers/crypto/ixp4xx_crypto.c b/drivers/crypto/ixp4xx_crypto.c index 8f3f74ce8c7f..21180d6cad6e 100644 --- a/drivers/crypto/ixp4xx_crypto.c +++ b/drivers/crypto/ixp4xx_crypto.c | |||
@@ -750,12 +750,12 @@ static int setup_cipher(struct crypto_tfm *tfm, int encrypt, | |||
750 | } | 750 | } |
751 | if (cipher_cfg & MOD_AES) { | 751 | if (cipher_cfg & MOD_AES) { |
752 | switch (key_len) { | 752 | switch (key_len) { |
753 | case 16: keylen_cfg = MOD_AES128 | KEYLEN_128; break; | 753 | case 16: keylen_cfg = MOD_AES128; break; |
754 | case 24: keylen_cfg = MOD_AES192 | KEYLEN_192; break; | 754 | case 24: keylen_cfg = MOD_AES192; break; |
755 | case 32: keylen_cfg = MOD_AES256 | KEYLEN_256; break; | 755 | case 32: keylen_cfg = MOD_AES256; break; |
756 | default: | 756 | default: |
757 | *flags |= CRYPTO_TFM_RES_BAD_KEY_LEN; | 757 | *flags |= CRYPTO_TFM_RES_BAD_KEY_LEN; |
758 | return -EINVAL; | 758 | return -EINVAL; |
759 | } | 759 | } |
760 | cipher_cfg |= keylen_cfg; | 760 | cipher_cfg |= keylen_cfg; |
761 | } else if (cipher_cfg & MOD_3DES) { | 761 | } else if (cipher_cfg & MOD_3DES) { |
diff --git a/drivers/crypto/omap-aes.c b/drivers/crypto/omap-aes.c index 093a8af59cbe..649a146e1382 100644 --- a/drivers/crypto/omap-aes.c +++ b/drivers/crypto/omap-aes.c | |||
@@ -29,8 +29,7 @@ | |||
29 | #include <crypto/scatterwalk.h> | 29 | #include <crypto/scatterwalk.h> |
30 | #include <crypto/aes.h> | 30 | #include <crypto/aes.h> |
31 | 31 | ||
32 | #include <plat/cpu.h> | 32 | #include <plat-omap/dma-omap.h> |
33 | #include <plat/dma.h> | ||
34 | 33 | ||
35 | /* OMAP TRM gives bitfields as start:end, where start is the higher bit | 34 | /* OMAP TRM gives bitfields as start:end, where start is the higher bit |
36 | number. For example 7:0 */ | 35 | number. For example 7:0 */ |
@@ -941,11 +940,6 @@ static int __init omap_aes_mod_init(void) | |||
941 | { | 940 | { |
942 | pr_info("loading %s driver\n", "omap-aes"); | 941 | pr_info("loading %s driver\n", "omap-aes"); |
943 | 942 | ||
944 | if (!cpu_class_is_omap2() || omap_type() != OMAP2_DEVICE_TYPE_SEC) { | ||
945 | pr_err("Unsupported cpu\n"); | ||
946 | return -ENODEV; | ||
947 | } | ||
948 | |||
949 | return platform_driver_register(&omap_aes_driver); | 943 | return platform_driver_register(&omap_aes_driver); |
950 | } | 944 | } |
951 | 945 | ||
diff --git a/drivers/crypto/omap-sham.c b/drivers/crypto/omap-sham.c index a3fd6fc504b1..d76fe06b9417 100644 --- a/drivers/crypto/omap-sham.c +++ b/drivers/crypto/omap-sham.c | |||
@@ -37,8 +37,7 @@ | |||
37 | #include <crypto/hash.h> | 37 | #include <crypto/hash.h> |
38 | #include <crypto/internal/hash.h> | 38 | #include <crypto/internal/hash.h> |
39 | 39 | ||
40 | #include <plat/cpu.h> | 40 | #include <plat-omap/dma-omap.h> |
41 | #include <plat/dma.h> | ||
42 | #include <mach/irqs.h> | 41 | #include <mach/irqs.h> |
43 | 42 | ||
44 | #define SHA_REG_DIGEST(x) (0x00 + ((x) * 0x04)) | 43 | #define SHA_REG_DIGEST(x) (0x00 + ((x) * 0x04)) |
@@ -1289,13 +1288,6 @@ static int __init omap_sham_mod_init(void) | |||
1289 | { | 1288 | { |
1290 | pr_info("loading %s driver\n", "omap-sham"); | 1289 | pr_info("loading %s driver\n", "omap-sham"); |
1291 | 1290 | ||
1292 | if (!cpu_class_is_omap2() || | ||
1293 | (omap_type() != OMAP2_DEVICE_TYPE_SEC && | ||
1294 | omap_type() != OMAP2_DEVICE_TYPE_EMU)) { | ||
1295 | pr_err("Unsupported cpu\n"); | ||
1296 | return -ENODEV; | ||
1297 | } | ||
1298 | |||
1299 | return platform_driver_register(&omap_sham_driver); | 1291 | return platform_driver_register(&omap_sham_driver); |
1300 | } | 1292 | } |
1301 | 1293 | ||