s5pc110 deep idle support: code clean up
authorMyungJoo Ham <MyungJoo.Ham@samsung.com>
Thu, 25 Mar 2010 05:16:28 +0000 (14:16 +0900)
committerMyungJoo Ham <MyungJoo.Ham@samsung.com>
Thu, 25 Mar 2010 05:16:28 +0000 (14:16 +0900)
board/samsung/universal/lowlevel_init.S
include/asm-arm/arch-s5pc1xx/clock.h
include/asm-arm/arch-s5pc1xx/power.h

index 75f963b..3383663 100644 (file)
@@ -68,8 +68,8 @@ lowlevel_init:
 
        ldr     r0, =S5PC110_RST_STAT
        ldr     r1, [r0]
-       bic     r1, r1, #0xfff6ffff
-       cmp     r1, #0x80000
+       and     r1, r1, #S5PC110_RST_STAT_WAKEUP_MODE_MASK
+       cmp     r1, #S5PC110_DEEPIDLE_WAKEUP
        beq     didle_wakeup
        cmp     r7, r8
 skip_check_didle:
@@ -407,8 +407,8 @@ didle_wakeup:
        ldr     r0, =S5PC110_APLL_CON
 lockloop:
        ldr     r1, [r0]
-       and     r1, r1, #(1<<29)
-       cmp     r1, #(1<<29)
+       and     r1, r1, #S5PC110_APLL_CON_LOCKED
+       cmp     r1, #S5PC110_APLL_CON_LOCKED
        bne     lockloop
 
        ldr     r0, =S5PC110_INFORM0
index 448e442..db97116 100644 (file)
@@ -32,6 +32,8 @@
 #define S5PC110_EPLL_CON               0xE0100110
 #define S5PC110_VPLL_CON               0xE0100120
 
+#define        S5PC110_APLL_CON_LOCKED         (1 << 29)
+
 #ifndef __ASSEMBLY__
 struct s5pc100_clock {
        unsigned int    apll_lock;
index 13b9519..f7871f9 100644 (file)
@@ -34,6 +34,9 @@
 
 #define S5PC110_RST_STAT               0xE010A000
 #define S5PC110_SLEEP_WAKEUP           (1 << 16)
+#define S5PC110_DEEPSTOP               (1 << 18)
+#define S5PC110_DEEPIDLE_WAKEUP                (1 << 19)
+#define S5PC110_RST_STAT_WAKEUP_MODE_MASK      0x000D0000
 #define S5PC110_OSC_CON                        0xE0108000
 #define S5PC110_PWR_CFG                        0xE010C000
 #define S5PC110_CFG_STANDBYWFI_MASK    (0x3 << 8)