aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorJon Hunter <jon-hunter@ti.com>2012-09-23 19:28:30 -0400
committerPaul Walmsley <paul@pwsan.com>2012-09-23 19:28:30 -0400
commit76a5d9bfc42d60e9a672e0cae776157a60970f4e (patch)
tree66cde27bd288e011a6e4cff87d342666399a1266 /arch
parent6a9bce2766ef8bb7025c011653914a94a2a9ef32 (diff)
ARM: OMAP4460/4470: PMU: Enable PMU for OMAP4460/70
OMAP4460 and OMAP4470 devices have dedicated PMU interrupts and so add these interrupts to the MPU HWMOD so we can use these for PMU events on these devices. The PMU interrupts need to be the first interrupts in the array of interrupts as the ARM PMU driver assumes this. By using these dedicated interrupts we only need to enable the MPU and DEBUG sub-systems for PMU to work. This is different to OMAP4430 that did not have dedicated interrupts and required other power domains in addition to the DEBUG sub-system to be enabled so we could route the PMU events to the CTI interrupts. Hence, OMAP4460 and OMAP4470 devices can use the same list of HWMODs to create the PMU device that is using by OMAP3. 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: updated to apply] Signed-off-by: Paul Walmsley <paul@pwsan.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mach-omap2/omap_hwmod_3xxx_data.c2
-rw-r--r--arch/arm/mach-omap2/omap_hwmod_44xx_data.c2
-rw-r--r--arch/arm/mach-omap2/pmu.c17
3 files changed, 11 insertions, 10 deletions
diff --git a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
index 4ad1f2b270af..016429d89bb0 100644
--- a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
@@ -2223,7 +2223,7 @@ static struct omap_hwmod_addr_space omap3xxx_l4_emu_addrs[] = {
2223static struct omap_hwmod_ocp_if omap3xxx_l3_main__l4_debugss = { 2223static struct omap_hwmod_ocp_if omap3xxx_l3_main__l4_debugss = {
2224 .master = &omap3xxx_l3_main_hwmod, 2224 .master = &omap3xxx_l3_main_hwmod,
2225 .slave = &omap3xxx_debugss_hwmod, 2225 .slave = &omap3xxx_debugss_hwmod,
2226 .addr = &omap3xxx_l4_emu_hwmod, 2226 .addr = omap3xxx_l4_emu_addrs,
2227 .user = OCP_USER_MPU, 2227 .user = OCP_USER_MPU,
2228}; 2228};
2229 2229
diff --git a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
index 17ab2dbc8931..e6b8d02d0b0e 100644
--- a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
@@ -2615,6 +2615,8 @@ static struct omap_hwmod_class omap44xx_mpu_hwmod_class = {
2615 2615
2616/* mpu */ 2616/* mpu */
2617static struct omap_hwmod_irq_info omap44xx_mpu_irqs[] = { 2617static struct omap_hwmod_irq_info omap44xx_mpu_irqs[] = {
2618 { .name = "pmu0", .irq = 54 + OMAP44XX_IRQ_GIC_START },
2619 { .name = "pmu1", .irq = 55 + OMAP44XX_IRQ_GIC_START },
2618 { .name = "pl310", .irq = 0 + OMAP44XX_IRQ_GIC_START }, 2620 { .name = "pl310", .irq = 0 + OMAP44XX_IRQ_GIC_START },
2619 { .name = "cti0", .irq = 1 + OMAP44XX_IRQ_GIC_START }, 2621 { .name = "cti0", .irq = 1 + OMAP44XX_IRQ_GIC_START },
2620 { .name = "cti1", .irq = 2 + OMAP44XX_IRQ_GIC_START }, 2622 { .name = "cti1", .irq = 2 + OMAP44XX_IRQ_GIC_START },
diff --git a/arch/arm/mach-omap2/pmu.c b/arch/arm/mach-omap2/pmu.c
index 05600374c240..2a791766283d 100644
--- a/arch/arm/mach-omap2/pmu.c
+++ b/arch/arm/mach-omap2/pmu.c
@@ -30,7 +30,7 @@ static struct platform_device *omap_pmu_dev;
30 * 30 *
31 * Uses OMAP HWMOD framework to create and register an ARM PMU device 31 * Uses OMAP HWMOD framework to create and register an ARM PMU device
32 * from a list of HWMOD names passed. Currently supports OMAP2, OMAP3 32 * from a list of HWMOD names passed. Currently supports OMAP2, OMAP3
33 * and OMAP4430 devices. 33 * and OMAP4 devices.
34 */ 34 */
35static int __init omap2_init_pmu(unsigned oh_num, char *oh_names[]) 35static int __init omap2_init_pmu(unsigned oh_num, char *oh_names[])
36{ 36{
@@ -74,21 +74,20 @@ static int __init omap_init_pmu(void)
74 * OMAP24xx: mpu 74 * OMAP24xx: mpu
75 * OMAP3xxx: mpu, debugss 75 * OMAP3xxx: mpu, debugss
76 * OMAP4430: l3_main_3, l3_instr, debugss 76 * OMAP4430: l3_main_3, l3_instr, debugss
77 * OMAP4460/70: mpu, debugss
77 */ 78 */
78 if (cpu_is_omap24xx()) { 79 if (cpu_is_omap443x()) {
79 oh_num = ARRAY_SIZE(omap2_pmu_oh_names);
80 oh_names = omap2_pmu_oh_names;
81 } else if (cpu_is_omap34xx()) {
82 oh_num = ARRAY_SIZE(omap3_pmu_oh_names);
83 oh_names = omap3_pmu_oh_names;
84 } else if (cpu_is_omap443x()) {
85 oh_num = ARRAY_SIZE(omap4430_pmu_oh_names); 80 oh_num = ARRAY_SIZE(omap4430_pmu_oh_names);
86 oh_names = omap4430_pmu_oh_names; 81 oh_names = omap4430_pmu_oh_names;
87 /* XXX Remove the next two lines when CTI driver available */ 82 /* XXX Remove the next two lines when CTI driver available */
88 pr_info("ARM PMU: not yet supported on OMAP4430 due to missing CTI driver\n"); 83 pr_info("ARM PMU: not yet supported on OMAP4430 due to missing CTI driver\n");
89 return 0; 84 return 0;
85 } else if (cpu_is_omap34xx() || cpu_is_omap44xx()) {
86 oh_num = ARRAY_SIZE(omap3_pmu_oh_names);
87 oh_names = omap3_pmu_oh_names;
90 } else { 88 } else {
91 return 0; 89 oh_num = ARRAY_SIZE(omap2_pmu_oh_names);
90 oh_names = omap2_pmu_oh_names;
92 } 91 }
93 92
94 return omap2_init_pmu(oh_num, oh_names); 93 return omap2_init_pmu(oh_num, oh_names);