From 95ff5a222c030f21aeadfb7ca27e7d256d6e5c85 Mon Sep 17 00:00:00 2001 From: MyungJoo Ham Date: Thu, 25 Mar 2010 14:16:28 +0900 Subject: [PATCH] s5pc110 deep idle support: code clean up --- board/samsung/universal/lowlevel_init.S | 8 ++++---- include/asm-arm/arch-s5pc1xx/clock.h | 2 ++ include/asm-arm/arch-s5pc1xx/power.h | 3 +++ 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/board/samsung/universal/lowlevel_init.S b/board/samsung/universal/lowlevel_init.S index 75f963b..3383663 100644 --- a/board/samsung/universal/lowlevel_init.S +++ b/board/samsung/universal/lowlevel_init.S @@ -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 diff --git a/include/asm-arm/arch-s5pc1xx/clock.h b/include/asm-arm/arch-s5pc1xx/clock.h index 448e442..db97116 100644 --- a/include/asm-arm/arch-s5pc1xx/clock.h +++ b/include/asm-arm/arch-s5pc1xx/clock.h @@ -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; diff --git a/include/asm-arm/arch-s5pc1xx/power.h b/include/asm-arm/arch-s5pc1xx/power.h index 13b9519..f7871f9 100644 --- a/include/asm-arm/arch-s5pc1xx/power.h +++ b/include/asm-arm/arch-s5pc1xx/power.h @@ -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) -- 2.7.4