[PATCH 1/5] qi-s3c6410-add-resume-path-processing.patch
Andy Green
andy at openmoko.com
Sat Dec 6 00:18:25 CET 2008
First go at resume processing for 6410, can't test it until Ben Dooks
confirms operation of Linux side on SMDK
Signed-off-by: Andy Green <andy at openmoko.com>
---
src/cpu/s3c6410/start.S | 39 ++++++++++++++++++++++++++++++++++++++-
1 files changed, 38 insertions(+), 1 deletions(-)
diff --git a/src/cpu/s3c6410/start.S b/src/cpu/s3c6410/start.S
index f9e5079..be90d57 100644
--- a/src/cpu/s3c6410/start.S
+++ b/src/cpu/s3c6410/start.S
@@ -423,9 +423,19 @@ start_code:
ldr r1, =0x1FFF
str r1, [r0, #UDIVSLOT_OFFSET]
+ /* resuming? */
+
+ ldr r0, =(ELFIN_CLOCK_POWER_BASE+RST_STAT_OFFSET)
+ ldr r1, [r0]
+ bic r1, r1, #0xfffffff7
+ cmp r1, #0x8
+ beq wakeup_reset
+
+ /* no, cold boot */
+
+ ldr r0, =ELFIN_UART_BASE + ELFIN_UART3_OFFSET
ldr r1, =0x55
str r1, [r0, #UTXH_OFFSET] @'U'
-
/* >> CFG_VIDEO_LOGO_MAX_SIZE */
#define CFG_GBL_DATA_SIZE 128 /* size in bytes reserved for initial data */
@@ -446,5 +456,32 @@ clbss_l:
b _steppingstone_done
+ /* resume */
+
+wakeup_reset:
+
+ ldr r0, =ELFIN_UART_BASE + ELFIN_UART3_OFFSET
+ ldr r1, =0x4b4b4b4b
+ str r1, [r0, #UTXH_OFFSET]
+
+ /*Clear wakeup status register*/
+ ldr r0, =(ELFIN_CLOCK_POWER_BASE+WAKEUP_STAT_OFFSET)
+ ldr r1, [r0]
+ str r1, [r0]
+
+#if 0
+ /*LED test*/
+ ldr r0, =ELFIN_GPIO_BASE
+ ldr r1, =0x3000
+ str r1, [r0, #GPNDAT_OFFSET]
+#endif
+
+ /*Load return address and jump to kernel*/
+ ldr r0, =(ELFIN_CLOCK_POWER_BASE+INF_REG0_OFFSET)
+ ldr r1, [r0] /* r1 = physical address of s3c6400_cpu_resume function*/
+ mov pc, r1 /*Jump to kernel (sleep-s3c6400.S)*/
+ nop
+ nop
+
4:
b 4b
More information about the openmoko-kernel
mailing list