Commit eeb7ba21ab7e84597e4156cb35f85839c20d66a1
Committed by
Benoit Cousson
1 parent
72f6f95753
Exists in
smarc-l5.0.0_1.0.0-ga
and in
5 other branches
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>
Showing 1 changed file with 11 additions and 3 deletions Side-by-side Diff
arch/arm/mach-omap2/pmu.c
... | ... | @@ -11,6 +11,8 @@ |
11 | 11 | * the Free Software Foundation; either version 2 of the License, or |
12 | 12 | * (at your option) any later version. |
13 | 13 | */ |
14 | +#include <linux/of.h> | |
15 | + | |
14 | 16 | #include <asm/pmu.h> |
15 | 17 | |
16 | 18 | #include "soc.h" |
... | ... | @@ -63,6 +65,15 @@ |
63 | 65 | unsigned oh_num; |
64 | 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 | 78 | * To create an ARM-PMU device the following HWMODs |
68 | 79 | * are required for the various OMAP2+ devices. |
... | ... | @@ -75,9 +86,6 @@ |
75 | 86 | if (cpu_is_omap443x()) { |
76 | 87 | oh_num = ARRAY_SIZE(omap4430_pmu_oh_names); |
77 | 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 | 89 | } else if (cpu_is_omap34xx() || cpu_is_omap44xx()) { |
82 | 90 | oh_num = ARRAY_SIZE(omap3_pmu_oh_names); |
83 | 91 | oh_names = omap3_pmu_oh_names; |