From: Daniel Lezcano <daniel.lezcano@linaro.org>
To: linus.walleij@linaro.org
Cc: linux-pm@vger.kernel.org, linux-arm-kernel@lists.infradead.org
Subject: [RFC PATCH] ARM: ux500: cpuidle: use of_compatible instead of cpu_id
Date: Thu, 27 Jun 2013 17:30:53 +0200 [thread overview]
Message-ID: <1372347053-27739-1-git-send-email-daniel.lezcano@linaro.org> (raw)
Remove the dependency on the id.h header by replacing the cpu_is_
functions by of_machine_is_compatible.
In order to have cpuidle working on these SoC, the device tree must be
enabled.
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
---
arch/arm/mach-ux500/cpuidle.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/arch/arm/mach-ux500/cpuidle.c b/arch/arm/mach-ux500/cpuidle.c
index a45dd09..872c6e9 100644
--- a/arch/arm/mach-ux500/cpuidle.c
+++ b/arch/arm/mach-ux500/cpuidle.c
@@ -14,6 +14,7 @@
#include <linux/spinlock.h>
#include <linux/atomic.h>
#include <linux/smp.h>
+#include <linux/of.h>
#include <linux/mfd/dbx500-prcmu.h>
#include <linux/platform_data/arm-ux500-pm.h>
@@ -21,7 +22,6 @@
#include <asm/proc-fns.h>
#include "db8500-regs.h"
-#include "id.h"
static atomic_t master = ATOMIC_INIT(0);
static DEFINE_SPINLOCK(master_lock);
@@ -115,7 +115,11 @@ static struct cpuidle_driver ux500_idle_driver = {
int __init ux500_idle_init(void)
{
- if (!(cpu_is_u8500_family() || cpu_is_ux540_family()))
+ if (!of_machine_is_compatible("st-ericsson,u8500") &&
+ !of_machine_is_compatible("st-ericsson,u9540") &&
+ !of_machine_is_compatible("calaosystems,snowball-a9500") &&
+ !of_machine_is_compatible("st-ericsson,u9500") &&
+ !of_machine_is_compatible("st-ericsson,mop500"))
return -ENODEV;
/* Configure wake up reasons */
--
1.7.9.5
reply other threads:[~2013-06-27 15:30 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=1372347053-27739-1-git-send-email-daniel.lezcano@linaro.org \
--to=daniel.lezcano@linaro.org \
--cc=linus.walleij@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-pm@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).