diff options
author | Lee Jones <lee.jones@linaro.org> | 2013-05-16 07:15:35 -0400 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2013-05-27 08:08:20 -0400 |
commit | 2c06897e4597b1cd68ef29e4145917a751c2b4cd (patch) | |
tree | bde8a6f158143effaaaea6970f6d5b0e1cb54cb6 | |
parent | e4aa937ec75df0eea0bee03bffa3303ad36c986b (diff) |
ARM: ux500: Only configure wake-up reasons on ux500 based platforms
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>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
-rw-r--r-- | arch/arm/mach-ux500/cpuidle.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/arm/mach-ux500/cpuidle.c b/arch/arm/mach-ux500/cpuidle.c index 317a2be129fb..a45dd09daed9 100644 --- a/arch/arm/mach-ux500/cpuidle.c +++ b/arch/arm/mach-ux500/cpuidle.c | |||
@@ -21,6 +21,7 @@ | |||
21 | #include <asm/proc-fns.h> | 21 | #include <asm/proc-fns.h> |
22 | 22 | ||
23 | #include "db8500-regs.h" | 23 | #include "db8500-regs.h" |
24 | #include "id.h" | ||
24 | 25 | ||
25 | static atomic_t master = ATOMIC_INIT(0); | 26 | static atomic_t master = ATOMIC_INIT(0); |
26 | static DEFINE_SPINLOCK(master_lock); | 27 | static DEFINE_SPINLOCK(master_lock); |
@@ -114,6 +115,9 @@ static struct cpuidle_driver ux500_idle_driver = { | |||
114 | 115 | ||
115 | int __init ux500_idle_init(void) | 116 | int __init ux500_idle_init(void) |
116 | { | 117 | { |
118 | if (!(cpu_is_u8500_family() || cpu_is_ux540_family())) | ||
119 | return -ENODEV; | ||
120 | |||
117 | /* Configure wake up reasons */ | 121 | /* Configure wake up reasons */ |
118 | prcmu_enable_wakeups(PRCMU_WAKEUP(ARM) | PRCMU_WAKEUP(RTC) | | 122 | prcmu_enable_wakeups(PRCMU_WAKEUP(ARM) | PRCMU_WAKEUP(RTC) | |
119 | PRCMU_WAKEUP(ABB)); | 123 | PRCMU_WAKEUP(ABB)); |