aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJon Hunter <jon-hunter@ti.com>2012-10-19 15:27:34 -0400
committerBenoit Cousson <benoit.cousson@linaro.org>2013-04-08 18:21:04 -0400
commiteeb7ba21ab7e84597e4156cb35f85839c20d66a1 (patch)
tree486cd6945a74e6de216168f8706fccc2d545ef29
parent72f6f957530321ba868fce65f19ad718c64b9366 (diff)
ARM: OMAP2+: Prepare for device-tree PMU support
If device-tree is present, then do not create the PMU device from within the OMAP specific PMU code. This is required to allow device-tree to create the PMU device from the PMU device-tree node. PMU is not currently supported for OMAP4430 (due to a dependency on having a cross-trigger interface driver) and so ensure that this indicated on boot with or without device-tree. Signed-off-by: Jon Hunter <jon-hunter@ti.com> Acked-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Benoit Cousson <benoit.cousson@linaro.org>
-rw-r--r--arch/arm/mach-omap2/pmu.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/arch/arm/mach-omap2/pmu.c b/arch/arm/mach-omap2/pmu.c
index 9debf822687c..9ace8eae7ee8 100644
--- a/arch/arm/mach-omap2/pmu.c
+++ b/arch/arm/mach-omap2/pmu.c
@@ -11,6 +11,8 @@
11 * the Free Software Foundation; either version 2 of the License, or 11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version. 12 * (at your option) any later version.
13 */ 13 */
14#include <linux/of.h>
15
14#include <asm/pmu.h> 16#include <asm/pmu.h>
15 17
16#include "soc.h" 18#include "soc.h"
@@ -63,6 +65,15 @@ static int __init omap_init_pmu(void)
63 unsigned oh_num; 65 unsigned oh_num;
64 char **oh_names; 66 char **oh_names;
65 67
68 /* XXX Remove this check when the CTI driver is available */
69 if (cpu_is_omap443x()) {
70 pr_info("ARM PMU: not yet supported on OMAP4430 due to missing CTI driver\n");
71 return 0;
72 }
73
74 if (of_have_populated_dt())
75 return 0;
76
66 /* 77 /*
67 * To create an ARM-PMU device the following HWMODs 78 * To create an ARM-PMU device the following HWMODs
68 * are required for the various OMAP2+ devices. 79 * are required for the various OMAP2+ devices.
@@ -75,9 +86,6 @@ static int __init omap_init_pmu(void)
75 if (cpu_is_omap443x()) { 86 if (cpu_is_omap443x()) {
76 oh_num = ARRAY_SIZE(omap4430_pmu_oh_names); 87 oh_num = ARRAY_SIZE(omap4430_pmu_oh_names);
77 oh_names = omap4430_pmu_oh_names; 88 oh_names = omap4430_pmu_oh_names;
78 /* XXX Remove the next two lines when CTI driver available */
79 pr_info("ARM PMU: not yet supported on OMAP4430 due to missing CTI driver\n");
80 return 0;
81 } else if (cpu_is_omap34xx() || cpu_is_omap44xx()) { 89 } else if (cpu_is_omap34xx() || cpu_is_omap44xx()) {
82 oh_num = ARRAY_SIZE(omap3_pmu_oh_names); 90 oh_num = ARRAY_SIZE(omap3_pmu_oh_names);
83 oh_names = omap3_pmu_oh_names; 91 oh_names = omap3_pmu_oh_names;