Skip to content

Commit

Permalink
ARM: ux500: Only configure wake-up reasons on ux500 based platforms
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Lee Jones authored and Linus Walleij committed May 27, 2013
1 parent e4aa937 commit 2c06897
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions arch/arm/mach-ux500/cpuidle.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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));
Expand Down

0 comments on commit 2c06897

Please sign in to comment.