r1059 - trunk/src/target/u-boot/patches

laforge at sita.openmoko.org laforge at sita.openmoko.org
Tue Feb 20 19:55:50 CET 2007


Author: laforge
Date: 2007-02-20 19:55:50 +0100 (Tue, 20 Feb 2007)
New Revision: 1059

Added:
   trunk/src/target/u-boot/patches/uboot-neo1973-resume.patch
Modified:
   trunk/src/target/u-boot/patches/series
Log:
add (not yet working) suspend/resume from/to RAM support (Ben Dooks)


Modified: trunk/src/target/u-boot/patches/series
===================================================================
--- trunk/src/target/u-boot/patches/series	2007-02-20 18:54:48 UTC (rev 1058)
+++ trunk/src/target/u-boot/patches/series	2007-02-20 18:55:50 UTC (rev 1059)
@@ -17,6 +17,7 @@
 uboot-s3c2410_fb.patch
 uboot-20061030-qt2410.patch 
 uboot-20061030-neo1973.patch 
+uboot-neo1973-resume.patch
 
 # this will be somewhat more difficult
 nand-dynamic_partitions.patch

Added: trunk/src/target/u-boot/patches/uboot-neo1973-resume.patch
===================================================================
--- trunk/src/target/u-boot/patches/uboot-neo1973-resume.patch	2007-02-20 18:54:48 UTC (rev 1058)
+++ trunk/src/target/u-boot/patches/uboot-neo1973-resume.patch	2007-02-20 18:55:50 UTC (rev 1059)
@@ -0,0 +1,66 @@
+Resume support for low-level uboot code
+
+Signed-off-by: Ben Dooks <ben-linux at fluff.org>
+
+--- 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-20 01:34:50.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,22 @@ 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	r0, =0x560000B4		/* gstatus2 */
++	ldr	r0, [ r0 ]
++	tst	r0, #0x02		/* is this resume from power down */
++	beq	not_resuming
++
++	ldr	r0, =0x560000B4		/* gstatus3 */
++	ldr	pc, [r0]		/* resume execution */
++	
++not_resuming:
+ 	/* everything is fine now */
+ 	mov	pc, lr
+ 





More information about the commitlog mailing list