From 3694b65f1771d5897e03ab76e784402b9bf4de5e Mon Sep 17 00:00:00 2001 From: =?utf8?q?=E8=AE=B8=E7=9B=9B=E9=A3=9E?= Date: Fri, 16 Jan 2015 08:47:06 +0800 Subject: [PATCH] rk312x: the bug of ddr-resume. phy soft de-reset dll MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: 许盛飞 --- arch/arm/mach-rockchip/rk312x_sleep.S | 29 ++++++++++++++++++++++----- 1 file changed, 24 insertions(+), 5 deletions(-) diff --git a/arch/arm/mach-rockchip/rk312x_sleep.S b/arch/arm/mach-rockchip/rk312x_sleep.S index 0b9a278c0b31..01aa1ecfa5bf 100755 --- a/arch/arm/mach-rockchip/rk312x_sleep.S +++ b/arch/arm/mach-rockchip/rk312x_sleep.S @@ -112,14 +112,33 @@ delay_loop: ldr r2,=0x2000a000 ldr r3,[r2,#0] - orr r3, r3, #0xc;/*phy soft de-reset*/ + orr r3, r3, #0x4;/*phy soft de-reset dll*/ + str r3,[r2,#0] + mov r0,#5 + mov r1,#5 + mul r0, r0, r1 +delay5us_loop: + subs r0, r0, #1 + bne delay5us_loop + orr r3, r3, #0x8;/*phy soft de-reset*/ str r3,[r2,#0] - sub r2, r2, #0x2000; /*0x20008000*/ - ldr r3,=0x40004 - str r3,[r2,#0x148] + sub r2,r2,#0x2000;/*0x20008000*/ + ldr r3,[r2,#0x300];/*get chip id*/ + sub r3,r3,#0x3100 + subs r3,r3,#0x12 + bne rk3126b_buffer_en;/*RK3126B*/ + ldr r3,=0x40004 + str r3,[r2,#0x148];/*buffer en*/ + b move_access +rk3126b_buffer_en: + ldr r2,=0x2000a000 + mov r3,#0x2 + str r3,[r2,#0x264] + +move_access: /*move to access status*/ - sub r2, r2, #0x4000;/*0x20004000*/ + ldr r2,=0x20004000 mov r3, #4 str r3,[r2,#0x4];/*wake up */ dsb sy -- 2.34.1