diff options
author | Rob Herring <rob.herring@calxeda.com> | 2012-12-30 11:15:06 -0500 |
---|---|---|
committer | Olof Johansson <olof@lixom.net> | 2013-01-08 00:08:25 -0500 |
commit | 9852910a0b0aa5548f990b51ad335921e0a710bf (patch) | |
tree | a440d465931017c0d0e3c6a9ac8f14fecae87457 /arch | |
parent | 0b3455a71e38b9c8cf4c2e791c909618c0a72078 (diff) |
ARM: highbank: add a power request clear
When we fail to power down, we need to clear out the power request.
Signed-off-by: Rob Herring <rob.herring@calxeda.com>
Signed-off-by: Olof Johansson <olof@lixom.net>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/mach-highbank/sysregs.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/arch/arm/mach-highbank/sysregs.h b/arch/arm/mach-highbank/sysregs.h index 707cfd3d80ec..70af9d13fcef 100644 --- a/arch/arm/mach-highbank/sysregs.h +++ b/arch/arm/mach-highbank/sysregs.h | |||
@@ -44,6 +44,15 @@ static inline void highbank_set_core_pwr(void) | |||
44 | writel_relaxed(1, sregs_base + SREG_CPU_PWR_CTRL(cpu)); | 44 | writel_relaxed(1, sregs_base + SREG_CPU_PWR_CTRL(cpu)); |
45 | } | 45 | } |
46 | 46 | ||
47 | static inline void highbank_clear_core_pwr(void) | ||
48 | { | ||
49 | int cpu = cpu_logical_map(smp_processor_id()); | ||
50 | if (scu_base_addr) | ||
51 | scu_power_mode(scu_base_addr, SCU_PM_NORMAL); | ||
52 | else | ||
53 | writel_relaxed(0, sregs_base + SREG_CPU_PWR_CTRL(cpu)); | ||
54 | } | ||
55 | |||
47 | static inline void highbank_set_pwr_suspend(void) | 56 | static inline void highbank_set_pwr_suspend(void) |
48 | { | 57 | { |
49 | writel(HB_PWR_SUSPEND, sregs_base + HB_SREG_A9_PWR_REQ); | 58 | writel(HB_PWR_SUSPEND, sregs_base + HB_SREG_A9_PWR_REQ); |
@@ -68,4 +77,10 @@ static inline void highbank_set_pwr_hard_reset(void) | |||
68 | highbank_set_core_pwr(); | 77 | highbank_set_core_pwr(); |
69 | } | 78 | } |
70 | 79 | ||
80 | static inline void highbank_clear_pwr_request(void) | ||
81 | { | ||
82 | writel(~0UL, sregs_base + HB_SREG_A9_PWR_REQ); | ||
83 | highbank_clear_core_pwr(); | ||
84 | } | ||
85 | |||
71 | #endif | 86 | #endif |