[ARM] 5014/1: Cleanup reset state before entering suspend or resetting.
authorDmitry Baryshkov <dbaryshkov@gmail.com>
Mon, 21 Apr 2008 10:54:13 +0000 (11:54 +0100)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Thu, 24 Apr 2008 13:34:26 +0000 (14:34 +0100)
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>
arch/arm/mach-pxa/pm.c
include/asm-arm/arch-pxa/system.h

index 039194cbe477fd90eaacaa613dd87e1417040d65..ec1bbf333a3ad5a74c8c1cb06c2b0c6613fa277b 100644 (file)
@@ -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);
index 1d56a3ef89fd3844df65403921f6a6b6c6ad45ab..a758a719180f64e5f4167eea0e9b6ca8b6ff3a75 100644 (file)
@@ -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);