aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMing Lei <ming.lei@canonical.com>2012-09-23 19:28:29 -0400
committerPaul Walmsley <paul@pwsan.com>2012-09-23 19:28:29 -0400
commitefc7f49c87b7b806fbd840eb0ece5a3c8d2d79ef (patch)
treebb42bba436335980d2f58fe7b3dd218f5a8bec7a
parentee75d95cea05bd4f42a5db7b17dd8529d25beddd (diff)
ARM: OMAP4430: PMU: prepare to create PMU device via HWMOD
For OMAP4430 PMU events are routed to the CPU via the cross trigger interface (CTI) because there are no dedicated interrupts. In order to route the PMU events via the CTI IRQs, the following modules must be enabled: l3_instr, l3_main_3, debugss Therefore, build the arm-pmu device via these three HWMODs. However, the CTI support for this platform still needs some work. Until that's finished, temporarily disable the PMU on OMAP4430. 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: Ming Lei <ming.lei@canonical.com> Signed-off-by: Will Deacon <will.deacon@arm.com> Signed-off-by: Jon Hunter <jon-hunter@ti.com> [paul@pwsan.com: temporarily disabled OMAP4430 PMU support until a better CTI interface can be implemented; added patch description note] Signed-off-by: Paul Walmsley <paul@pwsan.com>
-rw-r--r--arch/arm/mach-omap2/pmu.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/arch/arm/mach-omap2/pmu.c b/arch/arm/mach-omap2/pmu.c
index cf68bab4fde1..af35c77c4ab4 100644
--- a/arch/arm/mach-omap2/pmu.c
+++ b/arch/arm/mach-omap2/pmu.c
@@ -19,6 +19,7 @@
19 19
20static char *omap2_pmu_oh_names[] = {"mpu"}; 20static char *omap2_pmu_oh_names[] = {"mpu"};
21static char *omap3_pmu_oh_names[] = {"mpu", "debugss"}; 21static char *omap3_pmu_oh_names[] = {"mpu", "debugss"};
22static char *omap4430_pmu_oh_names[] = {"l3_main_3", "l3_instr", "debugss"};
22static struct platform_device *omap_pmu_dev; 23static struct platform_device *omap_pmu_dev;
23 24
24/** 25/**
@@ -27,16 +28,16 @@ static struct platform_device *omap_pmu_dev;
27 * @oh_names: Array of OMAP HWMODS names required to create PMU device 28 * @oh_names: Array of OMAP HWMODS names required to create PMU device
28 * 29 *
29 * Uses OMAP HWMOD framework to create and register an ARM PMU device 30 * Uses OMAP HWMOD framework to create and register an ARM PMU device
30 * from a list of HWMOD names passed. Currently supports OMAP2 and 31 * from a list of HWMOD names passed. Currently supports OMAP2, OMAP3
31 * OMAP3 devices. 32 * and OMAP4430 devices.
32 */ 33 */
33static int __init omap2_init_pmu(unsigned oh_num, char *oh_names[]) 34static int __init omap2_init_pmu(unsigned oh_num, char *oh_names[])
34{ 35{
35 int i; 36 int i;
36 struct omap_hwmod *oh[2]; 37 struct omap_hwmod *oh[3];
37 char *dev_name = "arm-pmu"; 38 char *dev_name = "arm-pmu";
38 39
39 if ((!oh_num) || (oh_num > 2)) 40 if ((!oh_num) || (oh_num > 3))
40 return -EINVAL; 41 return -EINVAL;
41 42
42 for (i = 0; i < oh_num; i++) { 43 for (i = 0; i < oh_num; i++) {
@@ -66,6 +67,7 @@ static int __init omap_init_pmu(void)
66 * 67 *
67 * OMAP24xx: mpu 68 * OMAP24xx: mpu
68 * OMAP3xxx: mpu, debugss 69 * OMAP3xxx: mpu, debugss
70 * OMAP4430: l3_main_3, l3_instr, debugss
69 */ 71 */
70 if (cpu_is_omap24xx()) { 72 if (cpu_is_omap24xx()) {
71 oh_num = ARRAY_SIZE(omap2_pmu_oh_names); 73 oh_num = ARRAY_SIZE(omap2_pmu_oh_names);
@@ -73,6 +75,12 @@ static int __init omap_init_pmu(void)
73 } else if (cpu_is_omap34xx()) { 75 } else if (cpu_is_omap34xx()) {
74 oh_num = ARRAY_SIZE(omap3_pmu_oh_names); 76 oh_num = ARRAY_SIZE(omap3_pmu_oh_names);
75 oh_names = omap3_pmu_oh_names; 77 oh_names = omap3_pmu_oh_names;
78 } else if (cpu_is_omap443x()) {
79 oh_num = ARRAY_SIZE(omap4430_pmu_oh_names);
80 oh_names = omap4430_pmu_oh_names;
81 /* XXX Remove the next two lines when CTI driver available */
82 pr_info("ARM PMU: not yet supported on OMAP4430 due to missing CTI driver\n");
83 return 0;
76 } else { 84 } else {
77 return 0; 85 return 0;
78 } 86 }