linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ARM: ux500: Only configure wake-up reasons on ux500 based platforms
@ 2013-05-16 11:15 Lee Jones
  2013-05-24  7:44 ` Linus Walleij
  0 siblings, 1 reply; 3+ messages in thread
From: Lee Jones @ 2013-05-16 11:15 UTC (permalink / raw)
  To: linux-arm-kernel

Multiplatform calls all enabled platforms' initcalls. In the
ux500_idle_init() initcall we call into the DBx500-PRCMU which in turn
executes some ux500 specific register reads/writes. When running on
some !ux500 platforms this ends up causing a kernel Oops. This patch
ensures the PRCMU call is only invoked when running on ux500 based
platforms.

Reported-by: Rob Herring <rob.herring@calxeda.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 arch/arm/mach-ux500/cpuidle.c |    4 ++++
 1 file changed, 4 insertions(+)

diff --git a/arch/arm/mach-ux500/cpuidle.c b/arch/arm/mach-ux500/cpuidle.c
index 317a2be..a45dd09 100644
--- a/arch/arm/mach-ux500/cpuidle.c
+++ b/arch/arm/mach-ux500/cpuidle.c
@@ -21,6 +21,7 @@
 #include <asm/proc-fns.h>
 
 #include "db8500-regs.h"
+#include "id.h"
 
 static atomic_t master = ATOMIC_INIT(0);
 static DEFINE_SPINLOCK(master_lock);
@@ -114,6 +115,9 @@ static struct cpuidle_driver ux500_idle_driver = {
 
 int __init ux500_idle_init(void)
 {
+	if (!(cpu_is_u8500_family() || cpu_is_ux540_family()))
+		return -ENODEV;
+
 	/* Configure wake up reasons */
 	prcmu_enable_wakeups(PRCMU_WAKEUP(ARM) | PRCMU_WAKEUP(RTC) |
 			     PRCMU_WAKEUP(ABB));
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH] ARM: ux500: Only configure wake-up reasons on ux500 based platforms
  2013-05-16 11:15 [PATCH] ARM: ux500: Only configure wake-up reasons on ux500 based platforms Lee Jones
@ 2013-05-24  7:44 ` Linus Walleij
  2013-05-24  8:24   ` Lee Jones
  0 siblings, 1 reply; 3+ messages in thread
From: Linus Walleij @ 2013-05-24  7:44 UTC (permalink / raw)
  To: linux-arm-kernel

On Thu, May 16, 2013 at 1:15 PM, Lee Jones <lee.jones@linaro.org> wrote:

> Multiplatform calls all enabled platforms' initcalls. In the
> ux500_idle_init() initcall we call into the DBx500-PRCMU which in turn
> executes some ux500 specific register reads/writes. When running on
> some !ux500 platforms this ends up causing a kernel Oops. This patch
> ensures the PRCMU call is only invoked when running on ux500 based
> platforms.
>
> Reported-by: Rob Herring <rob.herring@calxeda.com>
> Signed-off-by: Lee Jones <lee.jones@linaro.org>

Patch applied for ux500 fixes.

Hm, again and again I get so confused by this, don't you say
"wakeup CAUSE" rather than "wakeup REASON"?

Maybe I don't know the anglo saxon well enough...

Yours,
Linus Walleij

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH] ARM: ux500: Only configure wake-up reasons on ux500 based platforms
  2013-05-24  7:44 ` Linus Walleij
@ 2013-05-24  8:24   ` Lee Jones
  0 siblings, 0 replies; 3+ messages in thread
From: Lee Jones @ 2013-05-24  8:24 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, 24 May 2013, Linus Walleij wrote:

> On Thu, May 16, 2013 at 1:15 PM, Lee Jones <lee.jones@linaro.org> wrote:
> 
> > Multiplatform calls all enabled platforms' initcalls. In the
> > ux500_idle_init() initcall we call into the DBx500-PRCMU which in turn
> > executes some ux500 specific register reads/writes. When running on
> > some !ux500 platforms this ends up causing a kernel Oops. This patch
> > ensures the PRCMU call is only invoked when running on ux500 based
> > platforms.
> >
> > Reported-by: Rob Herring <rob.herring@calxeda.com>
> > Signed-off-by: Lee Jones <lee.jones@linaro.org>
> 
> Patch applied for ux500 fixes.
> 
> Hm, again and again I get so confused by this, don't you say
> "wakeup CAUSE" rather than "wakeup REASON"?
> 
> Maybe I don't know the anglo saxon well enough...

The words 'cause' and 'reason' are fairly synonymous and are
interchangeable in a great many situations. You have to be an English
literary Nazi to care enough to work out the semantics, which in case
you hadn't noticed, I'm not. :)

But, credit where credit's due, in this particular instance you are
correct. Feel free to fixup.

-- 
Lee Jones
Linaro ST-Ericsson Landing Team Lead
Linaro.org ? Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-05-24  8:24 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-05-16 11:15 [PATCH] ARM: ux500: Only configure wake-up reasons on ux500 based platforms Lee Jones
2013-05-24  7:44 ` Linus Walleij
2013-05-24  8:24   ` Lee Jones

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).