From: Jon Hunter <jon-hunter@ti.com>
To: Tony Lindgren <tony@atomide.com>, Benoit Cousson <b-cousson@ti.com>
Cc: device-tree <devicetree-discuss@lists.ozlabs.org>,
linux-omap <linux-omap@vger.kernel.org>,
linux-arm <linux-arm-kernel@lists.infradead.org>,
Jon Hunter <jon-hunter@ti.com>
Subject: [PATCH 1/9] ARM: OMAP2+: Prepare for device-tree PMU support
Date: Fri, 8 Mar 2013 11:27:25 -0600 [thread overview]
Message-ID: <1362763654-9660-2-git-send-email-jon-hunter@ti.com> (raw)
In-Reply-To: <1362763654-9660-1-git-send-email-jon-hunter@ti.com>
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>
---
arch/arm/mach-omap2/pmu.c | 14 +++++++++++---
1 file changed, 11 insertions(+), 3 deletions(-)
diff --git a/arch/arm/mach-omap2/pmu.c b/arch/arm/mach-omap2/pmu.c
index 9debf82..9ace8ea 100644
--- a/arch/arm/mach-omap2/pmu.c
+++ b/arch/arm/mach-omap2/pmu.c
@@ -11,6 +11,8 @@
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*/
+#include <linux/of.h>
+
#include <asm/pmu.h>
#include "soc.h"
@@ -63,6 +65,15 @@ static int __init omap_init_pmu(void)
unsigned oh_num;
char **oh_names;
+ /* XXX Remove this check when the CTI driver is available */
+ if (cpu_is_omap443x()) {
+ pr_info("ARM PMU: not yet supported on OMAP4430 due to missing CTI driver\n");
+ return 0;
+ }
+
+ if (of_have_populated_dt())
+ return 0;
+
/*
* To create an ARM-PMU device the following HWMODs
* are required for the various OMAP2+ devices.
@@ -75,9 +86,6 @@ static int __init omap_init_pmu(void)
if (cpu_is_omap443x()) {
oh_num = ARRAY_SIZE(omap4430_pmu_oh_names);
oh_names = omap4430_pmu_oh_names;
- /* XXX Remove the next two lines when CTI driver available */
- pr_info("ARM PMU: not yet supported on OMAP4430 due to missing CTI driver\n");
- return 0;
} else if (cpu_is_omap34xx() || cpu_is_omap44xx()) {
oh_num = ARRAY_SIZE(omap3_pmu_oh_names);
oh_names = omap3_pmu_oh_names;
--
1.7.10.4
next prev parent reply other threads:[~2013-03-08 17:27 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-08 17:27 [PATCH 0/9] ARM: dts: Various OMAP2+ device-tree updates Jon Hunter
2013-03-08 17:27 ` Jon Hunter [this message]
2013-03-08 17:27 ` [PATCH 2/9] ARM: dts: OMAP2+: Add PMU nodes Jon Hunter
2013-03-08 17:27 ` [PATCH 3/9] ARM: dts: OMAP2+: Add SDMA controller bindings and nodes Jon Hunter
2013-03-08 17:27 ` [PATCH 4/9] ARM: dts: OMAP3: Add support for OMAP3430 SDP board Jon Hunter
2013-03-09 2:25 ` Anil Kumar
2013-03-11 17:53 ` Jon Hunter
2013-03-12 2:42 ` Kumar, Anil
2013-03-12 8:50 ` Javier Martinez Canillas
2013-03-13 2:50 ` Kumar, Anil
2013-03-12 21:27 ` Jon Hunter
2013-03-13 2:59 ` Kumar, Anil
2013-03-11 2:45 ` Anil Kumar
2013-03-11 17:54 ` Jon Hunter
2013-03-08 17:27 ` [PATCH 5/9] ARM: dts: Add GPMC node for OMAP2, OMAP4 and OMAP5 Jon Hunter
2013-03-08 20:25 ` Javier Martinez Canillas
2013-03-08 21:41 ` Jon Hunter
2013-03-09 1:25 ` Javier Martinez Canillas
2013-03-09 12:42 ` Ezequiel Garcia
2013-03-11 17:56 ` Jon Hunter
2013-03-14 15:45 ` Benoit Cousson
2013-03-14 15:50 ` Jon Hunter
2013-03-14 15:57 ` Ezequiel Garcia
2013-03-14 15:58 ` Benoit Cousson
2013-03-14 16:00 ` Jon Hunter
2013-03-14 16:03 ` Benoit Cousson
2013-03-08 17:27 ` [PATCH 6/9] ARM: dts: Add OMAP3430 SDP flash memory bindings Jon Hunter
2013-03-08 17:27 ` [PATCH 7/9] ARM: dts: Add OMAP2 gpio bindings Jon Hunter
2013-03-08 17:27 ` [PATCH 8/9] ARM: dts: OMAP3+: Correct gpio #interrupts-cells property Jon Hunter
2013-03-08 17:27 ` [PATCH 9/9] ARM: dts: OMAP3: Add reg and interrupt properties for gpio Jon Hunter
2013-03-14 14:57 ` [PATCH 0/9] ARM: dts: Various OMAP2+ device-tree updates Benoit Cousson
2013-03-14 15:45 ` Florian Vaussard
2013-03-14 15:59 ` Jon Hunter
2013-03-14 16:06 ` Benoit Cousson
2013-03-14 16:02 ` Javier Martinez Canillas
2013-03-14 16:04 ` Jon Hunter
2013-03-14 16:08 ` Benoit Cousson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1362763654-9660-2-git-send-email-jon-hunter@ti.com \
--to=jon-hunter@ti.com \
--cc=b-cousson@ti.com \
--cc=devicetree-discuss@lists.ozlabs.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-omap@vger.kernel.org \
--cc=tony@atomide.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox