--- u-boot-1.2.0/board/neo1973/lowlevel_init.S	2007-02-20 00:49:00.000000000 +0000
+++ u-boot-1.2.0-bjd1/board/neo1973/lowlevel_init.S	2007-02-21 01:06:02.000000000 +0000
@@ -40,6 +40,8 @@
  *
  */
 
+#include "s3c2410.h"
+	
 #define BWSCON	0x48000000
 
 /* BWSCON */
@@ -134,6 +136,17 @@ _TEXT_BASE:
 
 .globl lowlevel_init
 lowlevel_init:
+	/* take sdram out of power down */
+	ldr	r0, =0x56000080		/* misccr */
+	ldr	r1, [ r0 ]
+	bic	r1, r1, #(S3C2410_MISCCR_nEN_SCLK0 | S3C2410_MISCCR_nEN_SCLK1 | S3C2410_MISCCR_nEN_SCLKE)
+	str	r1, [ r0 ]
+
+	/* ensure signals stabalise */
+	mov	r1, #128
+1:	subs	r1, r1, #1
+	bpl	1b
+	
 	/* memory control configuration */
 	/* make r0 relative the current location so that it */
 	/* reads SMRDATA out of FLASH rather than memory ! */
@@ -152,7 +165,7 @@ lowlevel_init:
 	mrc	p15, 0, r1 ,c1 ,c0, 0
 	orr	r1, r1, #0xc0000000
 	mcr	p15, 0, r1, c1, c0, 0
-
+		
 #if defined(CONFIG_ARCH_GTA01_v4) || defined(CONFIG_ARCH_GTA01B_v2) || defined(CONFIG_ARCH_GTA01B_v3)
 	/* switch on power for NAND */
 	ldr	r0, =0x56000010	/* GPBCON */
@@ -165,7 +178,21 @@ lowlevel_init:
 	orr	r1, r1, #(1 <<2)
 	str	r1, [r0]
 #endif
-
+	
+	/* ensure some refresh has happened */
+	mov	r1, #4096
+1:	subs	r1, r1, #1
+	bpl	1b
+	
+	/* test for resume */
+	ldr	r1, =0x560000B4		/* gstatus2 */
+	ldr	r0, [ r1 ]
+	tst	r0, #0x02		/* is this resume from power down */
+	beq	not_resuming
+
+	ldr	pc, [r1, #4]		/* gstatus3 */
+	
+not_resuming:
 	/* everything is fine now */
 	mov	pc, lr
 
