From 40abffaddfc021a6e0c1ba51c0b6b876b977302f Mon Sep 17 00:00:00 2001 From: Lukasz Majewski Date: Wed, 28 Apr 2010 10:23:47 +0200 Subject: [PATCH] s5pv210:P1P2:deep_idle deep_idle support for P1P2 Signed-off-by: Lukasz Majewski Signed-off-by: Minkyu Kang --- board/samsung/p1p2/lowlevel_init.S | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/board/samsung/p1p2/lowlevel_init.S b/board/samsung/p1p2/lowlevel_init.S index c914261..516f085 100644 --- a/board/samsung/p1p2/lowlevel_init.S +++ b/board/samsung/p1p2/lowlevel_init.S @@ -64,6 +64,17 @@ lowlevel_init: 100: /* Turn on KEY_LED_ON [GPJ4(1)] XMSMWEN */ cmp r7, r8 + + beq skip_check_didle @Support C110 only + + ldr r0, =S5PC110_RST_STAT + ldr r1, [r0] + and r1, r1, #S5PC110_RST_STAT_WAKEUP_MODE_MASK + cmp r1, #S5PC110_DEEPIDLE_WAKEUP + beq didle_wakeup + cmp r7, r8 +skip_check_didle: + #ifndef DEBUG_PM_C110 addeq r0, r8, #0x280 @S5PC100_GPIO_J4_OFFSET addne r0, r8, #0x2C0 @S5PC110_GPIO_J4_OFFSET @@ -291,6 +302,26 @@ wakeup: ldr r1, [r0] str r1, [r0] #endif + b 1f + +didle_wakeup: + /* Wait when APLL is locked */ + ldr r0, =S5PC110_APLL_CON +lockloop: + ldr r1, [r0] + and r1, r1, #S5PC110_APLL_CON_LOCKED + cmp r1, #S5PC110_APLL_CON_LOCKED + bne lockloop + + ldr r0, =S5PC110_INFORM0 + ldr r1, [r0] + mov pc, r1 + nop + nop + nop + nop + nop + 1: mov lr, r11 mov pc, lr -- 2.7.4