diff options
author | Tony Lindgren <tony@atomide.com> | 2010-05-20 14:37:23 -0400 |
---|---|---|
committer | Tony Lindgren <tony@atomide.com> | 2010-05-20 14:37:23 -0400 |
commit | f6304f5804f228b6c2fea9e3dfac25c5b2db9b38 (patch) | |
tree | 362b9b6a3bd32b868e5917a32d448ac75c5854df /arch/arm/mach-omap2/devices.c | |
parent | 4fa73a1bf89ebea4eba8a9982b5f64d266d8b5e9 (diff) | |
parent | 6daa642d9b8ec762b3c5641cd5e5fa855a5405bf (diff) |
Merge branch 'omap4-i2c-init' into omap-for-linus
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 3d30f22c4c88..705a7a30a87f 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 | { |
@@ -833,6 +866,7 @@ static int __init omap2_init_devices(void) | |||
833 | omap_init_camera(); | 866 | omap_init_camera(); |
834 | omap_init_mbox(); | 867 | omap_init_mbox(); |
835 | omap_init_mcspi(); | 868 | omap_init_mcspi(); |
869 | omap_init_pmu(); | ||
836 | omap_hdq_init(); | 870 | omap_hdq_init(); |
837 | omap_init_sti(); | 871 | omap_init_sti(); |
838 | omap_init_sha1_md5(); | 872 | omap_init_sha1_md5(); |