diff options
author | Achin Gupta <achin.gupta@arm.com> | 2013-11-12 16:40:00 +0000 |
---|---|---|
committer | Dan Handley <dan.handley@arm.com> | 2013-12-05 12:28:50 +0000 |
commit | b127cdb879aed2ced388af3cd9481e80c68f3e8c (patch) | |
tree | ceb879d87b15ea26d705d87f3a4fdf06e00cb6e5 /drivers/power/fvp_pwrc.c | |
parent | 4a826ddad8ea0fc5ce09709f534efb72cc33611c (diff) |
clear wakeup enable bit upon resuming from suspend
The FVP specific code that gets called after a cpu has been physically
powered on after having been turned off or suspended earlier does not
clear the PWRC.PWKUPR.WEN bit. Not doing so causes problems if: a cpu
is suspended, woken from suspend, powered down through a cpu_off call
& receives a spurious interrupt. Since the WEN bit is not cleared
after the cpu woke up from suspend, the spurious wakeup will power the
cpu on. Since the cpu_off call clears the jump address in the mailbox
this spurious wakeup will cause the cpu to crash.
This patch fixes this issue by clearing the WEN bit whenever a cpu is
powered up.
Change-Id: Ic91f5dffe1ed01d76bc7fc807acf0ecd3e38ce5b
Diffstat (limited to 'drivers/power/fvp_pwrc.c')
-rw-r--r-- | drivers/power/fvp_pwrc.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/drivers/power/fvp_pwrc.c b/drivers/power/fvp_pwrc.c index 2b98b054..cbaaa3d4 100644 --- a/drivers/power/fvp_pwrc.c +++ b/drivers/power/fvp_pwrc.c @@ -77,7 +77,7 @@ void fvp_pwrc_write_ppoffr(unsigned long mpidr) bakery_lock_release(mpidr, &pwrc_lock); } -void fvp_pwrc_write_pwkupr(unsigned long mpidr) +void fvp_pwrc_set_wen(unsigned long mpidr) { bakery_lock_get(mpidr, &pwrc_lock); mmio_write_32(PWRC_BASE + PWKUPR_OFF, @@ -85,6 +85,14 @@ void fvp_pwrc_write_pwkupr(unsigned long mpidr) bakery_lock_release(mpidr, &pwrc_lock); } +void fvp_pwrc_clr_wen(unsigned long mpidr) +{ + bakery_lock_get(mpidr, &pwrc_lock); + mmio_write_32(PWRC_BASE + PWKUPR_OFF, + (unsigned int) mpidr); + bakery_lock_release(mpidr, &pwrc_lock); +} + void fvp_pwrc_write_pcoffr(unsigned long mpidr) { bakery_lock_get(mpidr, &pwrc_lock); |