aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2/devices.c
diff options
context:
space:
mode:
authorJon Hunter <jon-hunter@ti.com>2012-09-23 19:28:29 -0400
committerPaul Walmsley <paul@pwsan.com>2012-09-23 19:28:29 -0400
commitee75d95cea05bd4f42a5db7b17dd8529d25beddd (patch)
treeb0420f03d6ab3eb0713cce7d4c433ed9276f6b3b /arch/arm/mach-omap2/devices.c
parentc7dad45f351e9bea8ebaa974f01b01c8f69432b4 (diff)
ARM: OMAP2+: PMU: Convert OMAP2/3 devices to use HWMOD
Convert OMAP2/3 devices to use HWMOD for creating a PMU device. To support PMU on OMAP2 devices we only need to use MPU sub-system and so we can simply use the MPU HWMOD to create the PMU device. To support PMU on OMAP3 devices, we need to use the MPU and DEBUG sub-systems and so use these HWMODs to create the PMU device for OMAP3. The MPU HWMOD for OMAP2/3 devices is currently missing the PMU interrupt and so add the PMU interrupt to the MPU HWMOD for these devices. This change also moves the PMU code out of the mach-omap2/devices.c files into its own pmu.c file as suggested by Kevin Hilman to de-clutter devices.c. Cc: Ming Lei <ming.lei@canonical.com> Cc: Will Deacon <will.deacon@arm.com> Cc: Benoit Cousson <b-cousson@ti.com> Cc: Paul Walmsley <paul@pwsan.com> Cc: Kevin Hilman <khilman@ti.com> Signed-off-by: Jon Hunter <jon-hunter@ti.com> [paul@pwsan.com: fixed checkpatch messages; updated to apply; dropped old-style initial filename line in header comments] 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.c29
1 files changed, 0 insertions, 29 deletions
diff --git a/arch/arm/mach-omap2/devices.c b/arch/arm/mach-omap2/devices.c
index 33bdbe4633aa..1b7e1c6e5359 100644
--- a/arch/arm/mach-omap2/devices.c
+++ b/arch/arm/mach-omap2/devices.c
@@ -434,34 +434,6 @@ static void omap_init_mcspi(void)
434static inline void omap_init_mcspi(void) {} 434static inline void omap_init_mcspi(void) {}
435#endif 435#endif
436 436
437static struct resource omap2_pmu_resource = {
438 .start = 3 + OMAP_INTC_START,
439 .flags = IORESOURCE_IRQ,
440};
441
442static struct resource omap3_pmu_resource = {
443 .start = 3 + OMAP_INTC_START,
444 .flags = IORESOURCE_IRQ,
445};
446
447static struct platform_device omap_pmu_device = {
448 .name = "arm-pmu",
449 .id = ARM_PMU_DEVICE_CPU,
450 .num_resources = 1,
451};
452
453static void omap_init_pmu(void)
454{
455 if (cpu_is_omap24xx())
456 omap_pmu_device.resource = &omap2_pmu_resource;
457 else if (cpu_is_omap34xx())
458 omap_pmu_device.resource = &omap3_pmu_resource;
459 else
460 return;
461
462 platform_device_register(&omap_pmu_device);
463}
464
465/** 437/**
466 * omap_init_rng - bind the RNG hwmod to the RNG omap_device 438 * omap_init_rng - bind the RNG hwmod to the RNG omap_device
467 * 439 *
@@ -664,7 +636,6 @@ static int __init omap2_init_devices(void)
664 omap_init_mcpdm(); 636 omap_init_mcpdm();
665 omap_init_mcspi(); 637 omap_init_mcspi();
666 } 638 }
667 omap_init_pmu();
668 omap_init_sti(); 639 omap_init_sti();
669 omap_init_rng(); 640 omap_init_rng();
670 omap_init_sham(); 641 omap_init_sham();