Skip to content

Commit

Permalink
[ARM] 5014/1: Cleanup reset state before entering suspend or resetting.
Browse files Browse the repository at this point in the history
The kernel should clean stale bits from reset status, so that
they won't confuse the bootloader.

Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
  • Loading branch information
Dmitry Baryshkov authored and Russell King committed Apr 24, 2008
1 parent 406b1ea commit d393061
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 2 additions & 2 deletions arch/arm/mach-pxa/pm.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ int pxa_pm_enter(suspend_state_t state)
sleep_save_checksum += sleep_save[i];
}

/* Clear sleep reset status */
RCSR = RCSR_SMR;
/* Clear reset status */
RCSR = RCSR_HWR | RCSR_WDR | RCSR_SMR | RCSR_GPR;

/* *** go zzz *** */
pxa_cpu_pm_fns->enter(state);
Expand Down
2 changes: 2 additions & 0 deletions include/asm-arm/arch-pxa/system.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ static inline void arch_idle(void)

static inline void arch_reset(char mode)
{
RCSR = RCSR_HWR | RCSR_WDR | RCSR_SMR | RCSR_GPR;

if (mode == 's') {
/* Jump into ROM at address 0 */
cpu_reset(0);
Expand Down

0 comments on commit d393061

Please sign in to comment.