diff options
Diffstat (limited to 'arch/arm/mach-omap2/devices.c')
| -rw-r--r-- | arch/arm/mach-omap2/devices.c | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/arch/arm/mach-omap2/devices.c b/arch/arm/mach-omap2/devices.c index 2271b9bd1f50..12154d10e536 100644 --- a/arch/arm/mach-omap2/devices.c +++ b/arch/arm/mach-omap2/devices.c | |||
| @@ -17,8 +17,10 @@ | |||
| 17 | #include <linux/clk.h> | 17 | #include <linux/clk.h> |
| 18 | 18 | ||
| 19 | #include <mach/hardware.h> | 19 | #include <mach/hardware.h> |
| 20 | #include <mach/irqs.h> | ||
| 20 | #include <asm/mach-types.h> | 21 | #include <asm/mach-types.h> |
| 21 | #include <asm/mach/map.h> | 22 | #include <asm/mach/map.h> |
| 23 | #include <asm/pmu.h> | ||
| 22 | 24 | ||
| 23 | #include <plat/control.h> | 25 | #include <plat/control.h> |
| 24 | #include <plat/tc.h> | 26 | #include <plat/tc.h> |
| @@ -453,6 +455,37 @@ static void omap_init_mcspi(void) | |||
| 453 | static inline void omap_init_mcspi(void) {} | 455 | static inline void omap_init_mcspi(void) {} |
| 454 | #endif | 456 | #endif |
| 455 | 457 | ||
| 458 | static struct resource omap2_pmu_resource = { | ||
| 459 | .start = 3, | ||
| 460 | .end = 3, | ||
| 461 | .flags = IORESOURCE_IRQ, | ||
| 462 | }; | ||
| 463 | |||
| 464 | static struct resource omap3_pmu_resource = { | ||
| 465 | .start = INT_34XX_BENCH_MPU_EMUL, | ||
| 466 | .end = INT_34XX_BENCH_MPU_EMUL, | ||
| 467 | .flags = IORESOURCE_IRQ, | ||
| 468 | }; | ||
| 469 | |||
| 470 | static struct platform_device omap_pmu_device = { | ||
| 471 | .name = "arm-pmu", | ||
| 472 | .id = ARM_PMU_DEVICE_CPU, | ||
| 473 | .num_resources = 1, | ||
| 474 | }; | ||
| 475 | |||
| 476 | static void omap_init_pmu(void) | ||
| 477 | { | ||
| 478 | if (cpu_is_omap24xx()) | ||
| 479 | omap_pmu_device.resource = &omap2_pmu_resource; | ||
| 480 | else if (cpu_is_omap34xx()) | ||
| 481 | omap_pmu_device.resource = &omap3_pmu_resource; | ||
| 482 | else | ||
| 483 | return; | ||
| 484 | |||
| 485 | platform_device_register(&omap_pmu_device); | ||
| 486 | } | ||
| 487 | |||
| 488 | |||
| 456 | #ifdef CONFIG_OMAP_SHA1_MD5 | 489 | #ifdef CONFIG_OMAP_SHA1_MD5 |
| 457 | static struct resource sha1_md5_resources[] = { | 490 | static struct resource sha1_md5_resources[] = { |
| 458 | { | 491 | { |
| @@ -797,6 +830,7 @@ static int __init omap2_init_devices(void) | |||
| 797 | omap_init_camera(); | 830 | omap_init_camera(); |
| 798 | omap_init_mbox(); | 831 | omap_init_mbox(); |
| 799 | omap_init_mcspi(); | 832 | omap_init_mcspi(); |
| 833 | omap_init_pmu(); | ||
| 800 | omap_hdq_init(); | 834 | omap_hdq_init(); |
| 801 | omap_init_sti(); | 835 | omap_init_sti(); |
| 802 | omap_init_sha1_md5(); | 836 | omap_init_sha1_md5(); |
