diff options
author | Mark A. Greer <mgreer@animalcreek.com> | 2013-03-18 12:06:32 -0400 |
---|---|---|
committer | Paul Walmsley <paul@pwsan.com> | 2013-03-30 17:51:12 -0400 |
commit | 26f88e6ebfcb4a80050c7345919b9ab8e6eafeae (patch) | |
tree | 90afea766f8084934b688fbd6c994d54bbf9e63e /arch/arm/mach-omap2/devices.c | |
parent | fa7807b4cc77376b3ec245f8663201780e6c7450 (diff) |
ARM: OMAP3xxx: hwmod: Convert SHAM crypto device data to hwmod
Convert the device data for the OMAP3 SHAM2 (SHA1/MD5) crypto IP
from explicit platform_data to hwmod.
CC: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Mark A. Greer <mgreer@animalcreek.com>
[paul@pwsan.com: updated to use per-SoC registration lists for GP-only hwmods;
fixed lines causing sparse warnings]
Signed-off-by: Paul Walmsley <paul@pwsan.com>
Diffstat (limited to 'arch/arm/mach-omap2/devices.c')
-rw-r--r-- | arch/arm/mach-omap2/devices.c | 41 |
1 files changed, 2 insertions, 39 deletions
diff --git a/arch/arm/mach-omap2/devices.c b/arch/arm/mach-omap2/devices.c index 8d51c65bdfce..df109dc6bd81 100644 --- a/arch/arm/mach-omap2/devices.c +++ b/arch/arm/mach-omap2/devices.c | |||
@@ -504,38 +504,9 @@ static void omap_init_rng(void) | |||
504 | WARN(IS_ERR(pdev), "Can't build omap_device for omap_rng\n"); | 504 | WARN(IS_ERR(pdev), "Can't build omap_device for omap_rng\n"); |
505 | } | 505 | } |
506 | 506 | ||
507 | #if defined(CONFIG_CRYPTO_DEV_OMAP_SHAM) || defined(CONFIG_CRYPTO_DEV_OMAP_SHAM_MODULE) | 507 | static void __init omap_init_sham(void) |
508 | |||
509 | #ifdef CONFIG_ARCH_OMAP3 | ||
510 | static struct resource omap3_sham_resources[] = { | ||
511 | { | ||
512 | .start = OMAP34XX_SEC_SHA1MD5_BASE, | ||
513 | .end = OMAP34XX_SEC_SHA1MD5_BASE + 0x64, | ||
514 | .flags = IORESOURCE_MEM, | ||
515 | }, | ||
516 | { | ||
517 | .start = 49 + OMAP_INTC_START, | ||
518 | .flags = IORESOURCE_IRQ, | ||
519 | }, | ||
520 | { | ||
521 | .start = OMAP34XX_DMA_SHA1MD5_RX, | ||
522 | .flags = IORESOURCE_DMA, | ||
523 | } | ||
524 | }; | ||
525 | static int omap3_sham_resources_sz = ARRAY_SIZE(omap3_sham_resources); | ||
526 | #else | ||
527 | #define omap3_sham_resources NULL | ||
528 | #define omap3_sham_resources_sz 0 | ||
529 | #endif | ||
530 | |||
531 | static struct platform_device sham_device = { | ||
532 | .name = "omap-sham", | ||
533 | .id = -1, | ||
534 | }; | ||
535 | |||
536 | static void omap_init_sham(void) | ||
537 | { | 508 | { |
538 | if (cpu_is_omap24xx()) { | 509 | if (cpu_is_omap24xx() || cpu_is_omap34xx()) { |
539 | struct omap_hwmod *oh; | 510 | struct omap_hwmod *oh; |
540 | struct platform_device *pdev; | 511 | struct platform_device *pdev; |
541 | 512 | ||
@@ -545,18 +516,10 @@ static void omap_init_sham(void) | |||
545 | 516 | ||
546 | pdev = omap_device_build("omap-sham", -1, oh, NULL, 0); | 517 | pdev = omap_device_build("omap-sham", -1, oh, NULL, 0); |
547 | WARN(IS_ERR(pdev), "Can't build omap_device for omap-sham\n"); | 518 | WARN(IS_ERR(pdev), "Can't build omap_device for omap-sham\n"); |
548 | } else if (cpu_is_omap34xx()) { | ||
549 | sham_device.resource = omap3_sham_resources; | ||
550 | sham_device.num_resources = omap3_sham_resources_sz; | ||
551 | platform_device_register(&sham_device); | ||
552 | } else { | 519 | } else { |
553 | pr_err("%s: platform not supported\n", __func__); | 520 | pr_err("%s: platform not supported\n", __func__); |
554 | return; | ||
555 | } | 521 | } |
556 | } | 522 | } |
557 | #else | ||
558 | static inline void omap_init_sham(void) { } | ||
559 | #endif | ||
560 | 523 | ||
561 | #if defined(CONFIG_CRYPTO_DEV_OMAP_AES) || defined(CONFIG_CRYPTO_DEV_OMAP_AES_MODULE) | 524 | #if defined(CONFIG_CRYPTO_DEV_OMAP_AES) || defined(CONFIG_CRYPTO_DEV_OMAP_AES_MODULE) |
562 | 525 | ||