diff options
Diffstat (limited to 'arch/arm/mach-omap2/devices.c')
-rw-r--r-- | arch/arm/mach-omap2/devices.c | 39 |
1 files changed, 14 insertions, 25 deletions
diff --git a/arch/arm/mach-omap2/devices.c b/arch/arm/mach-omap2/devices.c index d092d2a89ee0..c8c211731d26 100644 --- a/arch/arm/mach-omap2/devices.c +++ b/arch/arm/mach-omap2/devices.c | |||
@@ -433,35 +433,24 @@ static void omap_init_mcspi(void) | |||
433 | static inline void omap_init_mcspi(void) {} | 433 | static inline void omap_init_mcspi(void) {} |
434 | #endif | 434 | #endif |
435 | 435 | ||
436 | static struct resource omap2_pmu_resource = { | 436 | /** |
437 | .start = 3 + OMAP_INTC_START, | 437 | * omap_init_rng - bind the RNG hwmod to the RNG omap_device |
438 | .flags = IORESOURCE_IRQ, | 438 | * |
439 | }; | 439 | * Bind the RNG hwmod to the RNG omap_device. No return value. |
440 | 440 | */ | |
441 | static struct resource omap3_pmu_resource = { | 441 | static void omap_init_rng(void) |
442 | .start = 3 + OMAP_INTC_START, | ||
443 | .flags = IORESOURCE_IRQ, | ||
444 | }; | ||
445 | |||
446 | static struct platform_device omap_pmu_device = { | ||
447 | .name = "arm-pmu", | ||
448 | .id = -1, | ||
449 | .num_resources = 1, | ||
450 | }; | ||
451 | |||
452 | static void omap_init_pmu(void) | ||
453 | { | 442 | { |
454 | if (cpu_is_omap24xx()) | 443 | struct omap_hwmod *oh; |
455 | omap_pmu_device.resource = &omap2_pmu_resource; | 444 | struct platform_device *pdev; |
456 | else if (cpu_is_omap34xx()) | 445 | |
457 | omap_pmu_device.resource = &omap3_pmu_resource; | 446 | oh = omap_hwmod_lookup("rng"); |
458 | else | 447 | if (!oh) |
459 | return; | 448 | return; |
460 | 449 | ||
461 | platform_device_register(&omap_pmu_device); | 450 | pdev = omap_device_build("omap_rng", -1, oh, NULL, 0, NULL, 0, 0); |
451 | WARN(IS_ERR(pdev), "Can't build omap_device for omap_rng\n"); | ||
462 | } | 452 | } |
463 | 453 | ||
464 | |||
465 | #if defined(CONFIG_CRYPTO_DEV_OMAP_SHAM) || defined(CONFIG_CRYPTO_DEV_OMAP_SHAM_MODULE) | 454 | #if defined(CONFIG_CRYPTO_DEV_OMAP_SHAM) || defined(CONFIG_CRYPTO_DEV_OMAP_SHAM_MODULE) |
466 | 455 | ||
467 | #ifdef CONFIG_ARCH_OMAP2 | 456 | #ifdef CONFIG_ARCH_OMAP2 |
@@ -646,8 +635,8 @@ static int __init omap2_init_devices(void) | |||
646 | omap_init_mcpdm(); | 635 | omap_init_mcpdm(); |
647 | omap_init_mcspi(); | 636 | omap_init_mcspi(); |
648 | } | 637 | } |
649 | omap_init_pmu(); | ||
650 | omap_init_sti(); | 638 | omap_init_sti(); |
639 | omap_init_rng(); | ||
651 | omap_init_sham(); | 640 | omap_init_sham(); |
652 | omap_init_aes(); | 641 | omap_init_aes(); |
653 | omap_init_vout(); | 642 | omap_init_vout(); |