aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2010-05-21 17:46:51 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2010-05-21 17:46:51 -0400
commit2a8ba8f032160552a3beffab8aae9019ff477504 (patch)
treeb50f70a3c8f7c2e179e1587d33ea3542d68525f9 /arch/arm
parentec2a7587e0a91d5c1afe23a0a73edfce06c5e4e0 (diff)
parente954bc91bdd4bb08b8325478c5004b24a23a3522 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: (46 commits) random: simplify fips mode crypto: authenc - Fix cryptlen calculation crypto: talitos - add support for sha224 crypto: talitos - add hash algorithms crypto: talitos - second prepare step for adding ahash algorithms crypto: talitos - prepare for adding ahash algorithms crypto: n2 - Add Niagara2 crypto driver crypto: skcipher - Add ablkcipher_walk interfaces crypto: testmgr - Add testing for async hashing and update/final crypto: tcrypt - Add speed tests for async hashing crypto: scatterwalk - Fix scatterwalk_done() test crypto: hifn_795x - Rename ablkcipher_walk to hifn_cipher_walk padata: Use get_online_cpus/put_online_cpus in padata_free padata: Add some code comments padata: Flush the padata queues actively padata: Use a timer to handle remaining objects in the reorder queues crypto: shash - Remove usage of CRYPTO_MINALIGN crypto: mv_cesa - Use resource_size crypto: omap - OMAP macros corrected padata: Use get_online_cpus/put_online_cpus ... Fix up conflicts in arch/arm/mach-omap2/devices.c
Diffstat (limited to 'arch/arm')
-rw-r--r--arch/arm/mach-omap2/clock2420_data.c2
-rw-r--r--arch/arm/mach-omap2/clock2430_data.c2
-rw-r--r--arch/arm/mach-omap2/clock3xxx_data.c2
-rw-r--r--arch/arm/mach-omap2/devices.c58
-rw-r--r--arch/arm/plat-omap/include/plat/omap34xx.h5
5 files changed, 56 insertions, 13 deletions
diff --git a/arch/arm/mach-omap2/clock2420_data.c b/arch/arm/mach-omap2/clock2420_data.c
index 23bc981574f6..37d65d62ed8f 100644
--- a/arch/arm/mach-omap2/clock2420_data.c
+++ b/arch/arm/mach-omap2/clock2420_data.c
@@ -1836,7 +1836,7 @@ static struct omap_clk omap2420_clks[] = {
1836 CLK(NULL, "vlynq_ick", &vlynq_ick, CK_242X), 1836 CLK(NULL, "vlynq_ick", &vlynq_ick, CK_242X),
1837 CLK(NULL, "vlynq_fck", &vlynq_fck, CK_242X), 1837 CLK(NULL, "vlynq_fck", &vlynq_fck, CK_242X),
1838 CLK(NULL, "des_ick", &des_ick, CK_242X), 1838 CLK(NULL, "des_ick", &des_ick, CK_242X),
1839 CLK(NULL, "sha_ick", &sha_ick, CK_242X), 1839 CLK("omap-sham", "ick", &sha_ick, CK_242X),
1840 CLK("omap_rng", "ick", &rng_ick, CK_242X), 1840 CLK("omap_rng", "ick", &rng_ick, CK_242X),
1841 CLK(NULL, "aes_ick", &aes_ick, CK_242X), 1841 CLK(NULL, "aes_ick", &aes_ick, CK_242X),
1842 CLK(NULL, "pka_ick", &pka_ick, CK_242X), 1842 CLK(NULL, "pka_ick", &pka_ick, CK_242X),
diff --git a/arch/arm/mach-omap2/clock2430_data.c b/arch/arm/mach-omap2/clock2430_data.c
index 2df50d97deb2..b33118fb6a87 100644
--- a/arch/arm/mach-omap2/clock2430_data.c
+++ b/arch/arm/mach-omap2/clock2430_data.c
@@ -1924,7 +1924,7 @@ static struct omap_clk omap2430_clks[] = {
1924 CLK(NULL, "sdma_ick", &sdma_ick, CK_243X), 1924 CLK(NULL, "sdma_ick", &sdma_ick, CK_243X),
1925 CLK(NULL, "sdrc_ick", &sdrc_ick, CK_243X), 1925 CLK(NULL, "sdrc_ick", &sdrc_ick, CK_243X),
1926 CLK(NULL, "des_ick", &des_ick, CK_243X), 1926 CLK(NULL, "des_ick", &des_ick, CK_243X),
1927 CLK(NULL, "sha_ick", &sha_ick, CK_243X), 1927 CLK("omap-sham", "ick", &sha_ick, CK_243X),
1928 CLK("omap_rng", "ick", &rng_ick, CK_243X), 1928 CLK("omap_rng", "ick", &rng_ick, CK_243X),
1929 CLK(NULL, "aes_ick", &aes_ick, CK_243X), 1929 CLK(NULL, "aes_ick", &aes_ick, CK_243X),
1930 CLK(NULL, "pka_ick", &pka_ick, CK_243X), 1930 CLK(NULL, "pka_ick", &pka_ick, CK_243X),
diff --git a/arch/arm/mach-omap2/clock3xxx_data.c b/arch/arm/mach-omap2/clock3xxx_data.c
index 833be485c89e..41b155acfca7 100644
--- a/arch/arm/mach-omap2/clock3xxx_data.c
+++ b/arch/arm/mach-omap2/clock3xxx_data.c
@@ -3284,7 +3284,7 @@ static struct omap_clk omap3xxx_clks[] = {
3284 CLK("mmci-omap-hs.2", "ick", &mmchs3_ick, CK_3430ES2 | CK_AM35XX), 3284 CLK("mmci-omap-hs.2", "ick", &mmchs3_ick, CK_3430ES2 | CK_AM35XX),
3285 CLK(NULL, "icr_ick", &icr_ick, CK_343X), 3285 CLK(NULL, "icr_ick", &icr_ick, CK_343X),
3286 CLK(NULL, "aes2_ick", &aes2_ick, CK_343X), 3286 CLK(NULL, "aes2_ick", &aes2_ick, CK_343X),
3287 CLK(NULL, "sha12_ick", &sha12_ick, CK_343X), 3287 CLK("omap-sham", "ick", &sha12_ick, CK_343X),
3288 CLK(NULL, "des2_ick", &des2_ick, CK_343X), 3288 CLK(NULL, "des2_ick", &des2_ick, CK_343X),
3289 CLK("mmci-omap-hs.1", "ick", &mmchs2_ick, CK_3XXX), 3289 CLK("mmci-omap-hs.1", "ick", &mmchs2_ick, CK_3XXX),
3290 CLK("mmci-omap-hs.0", "ick", &mmchs1_ick, CK_3XXX), 3290 CLK("mmci-omap-hs.0", "ick", &mmchs1_ick, CK_3XXX),
diff --git a/arch/arm/mach-omap2/devices.c b/arch/arm/mach-omap2/devices.c
index 705a7a30a87f..03e6c9ed82a4 100644
--- a/arch/arm/mach-omap2/devices.c
+++ b/arch/arm/mach-omap2/devices.c
@@ -28,6 +28,7 @@
28#include <plat/mux.h> 28#include <plat/mux.h>
29#include <mach/gpio.h> 29#include <mach/gpio.h>
30#include <plat/mmc.h> 30#include <plat/mmc.h>
31#include <plat/dma.h>
31 32
32#include "mux.h" 33#include "mux.h"
33 34
@@ -486,8 +487,10 @@ static void omap_init_pmu(void)
486} 487}
487 488
488 489
489#ifdef CONFIG_OMAP_SHA1_MD5 490#if defined(CONFIG_CRYPTO_DEV_OMAP_SHAM) || defined(CONFIG_CRYPTO_DEV_OMAP_SHAM_MODULE)
490static struct resource sha1_md5_resources[] = { 491
492#ifdef CONFIG_ARCH_OMAP2
493static struct resource omap2_sham_resources[] = {
491 { 494 {
492 .start = OMAP24XX_SEC_SHA1MD5_BASE, 495 .start = OMAP24XX_SEC_SHA1MD5_BASE,
493 .end = OMAP24XX_SEC_SHA1MD5_BASE + 0x64, 496 .end = OMAP24XX_SEC_SHA1MD5_BASE + 0x64,
@@ -498,20 +501,55 @@ static struct resource sha1_md5_resources[] = {
498 .flags = IORESOURCE_IRQ, 501 .flags = IORESOURCE_IRQ,
499 } 502 }
500}; 503};
504static int omap2_sham_resources_sz = ARRAY_SIZE(omap2_sham_resources);
505#else
506#define omap2_sham_resources NULL
507#define omap2_sham_resources_sz 0
508#endif
501 509
502static struct platform_device sha1_md5_device = { 510#ifdef CONFIG_ARCH_OMAP3
503 .name = "OMAP SHA1/MD5", 511static struct resource omap3_sham_resources[] = {
512 {
513 .start = OMAP34XX_SEC_SHA1MD5_BASE,
514 .end = OMAP34XX_SEC_SHA1MD5_BASE + 0x64,
515 .flags = IORESOURCE_MEM,
516 },
517 {
518 .start = INT_34XX_SHA1MD52_IRQ,
519 .flags = IORESOURCE_IRQ,
520 },
521 {
522 .start = OMAP34XX_DMA_SHA1MD5_RX,
523 .flags = IORESOURCE_DMA,
524 }
525};
526static int omap3_sham_resources_sz = ARRAY_SIZE(omap3_sham_resources);
527#else
528#define omap3_sham_resources NULL
529#define omap3_sham_resources_sz 0
530#endif
531
532static struct platform_device sham_device = {
533 .name = "omap-sham",
504 .id = -1, 534 .id = -1,
505 .num_resources = ARRAY_SIZE(sha1_md5_resources),
506 .resource = sha1_md5_resources,
507}; 535};
508 536
509static void omap_init_sha1_md5(void) 537static void omap_init_sham(void)
510{ 538{
511 platform_device_register(&sha1_md5_device); 539 if (cpu_is_omap24xx()) {
540 sham_device.resource = omap2_sham_resources;
541 sham_device.num_resources = omap2_sham_resources_sz;
542 } else if (cpu_is_omap34xx()) {
543 sham_device.resource = omap3_sham_resources;
544 sham_device.num_resources = omap3_sham_resources_sz;
545 } else {
546 pr_err("%s: platform not supported\n", __func__);
547 return;
548 }
549 platform_device_register(&sham_device);
512} 550}
513#else 551#else
514static inline void omap_init_sha1_md5(void) { } 552static inline void omap_init_sham(void) { }
515#endif 553#endif
516 554
517/*-------------------------------------------------------------------------*/ 555/*-------------------------------------------------------------------------*/
@@ -869,7 +907,7 @@ static int __init omap2_init_devices(void)
869 omap_init_pmu(); 907 omap_init_pmu();
870 omap_hdq_init(); 908 omap_hdq_init();
871 omap_init_sti(); 909 omap_init_sti();
872 omap_init_sha1_md5(); 910 omap_init_sham();
873 omap_init_vout(); 911 omap_init_vout();
874 912
875 return 0; 913 return 0;
diff --git a/arch/arm/plat-omap/include/plat/omap34xx.h b/arch/arm/plat-omap/include/plat/omap34xx.h
index 2845fdc658b0..98fc8b4a4cc4 100644
--- a/arch/arm/plat-omap/include/plat/omap34xx.h
+++ b/arch/arm/plat-omap/include/plat/omap34xx.h
@@ -82,5 +82,10 @@
82 82
83#define OMAP34XX_MAILBOX_BASE (L4_34XX_BASE + 0x94000) 83#define OMAP34XX_MAILBOX_BASE (L4_34XX_BASE + 0x94000)
84 84
85/* Security */
86#define OMAP34XX_SEC_BASE (L4_34XX_BASE + 0xA0000)
87#define OMAP34XX_SEC_SHA1MD5_BASE (OMAP34XX_SEC_BASE + 0x23000)
88#define OMAP34XX_SEC_AES_BASE (OMAP34XX_SEC_BASE + 0x25000)
89
85#endif /* __ASM_ARCH_OMAP3_H */ 90#endif /* __ASM_ARCH_OMAP3_H */
86 91