Skip to content

Commit 9852910

Browse files
Rob Herringolofj
authored andcommitted
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>
1 parent 0b3455a commit 9852910

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

arch/arm/mach-highbank/sysregs.h

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,15 @@ static inline void highbank_set_core_pwr(void)
4444
writel_relaxed(1, sregs_base + SREG_CPU_PWR_CTRL(cpu));
4545
}
4646

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+
4756
static inline void highbank_set_pwr_suspend(void)
4857
{
4958
writel(HB_PWR_SUSPEND, sregs_base + HB_SREG_A9_PWR_REQ);
@@ -68,4 +77,10 @@ static inline void highbank_set_pwr_hard_reset(void)
6877
highbank_set_core_pwr();
6978
}
7079

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+
7186
#endif

0 commit comments

Comments
 (0)