From 18316f670aceab5e104dc30fa1149daee894539c Mon Sep 17 00:00:00 2001 From: Karl Kurbjun Date: Wed, 12 Nov 2008 04:34:53 +0000 Subject: (really) commit the crt0.S changes needed for the wakeup alarm. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19096 a1c6a512-1295-4272-9138-f99709370657 --- firmware/target/arm/s3c2440/crt0.S | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'firmware/target') diff --git a/firmware/target/arm/s3c2440/crt0.S b/firmware/target/arm/s3c2440/crt0.S index ff5eafd042..af0ef5bba8 100644 --- a/firmware/target/arm/s3c2440/crt0.S +++ b/firmware/target/arm/s3c2440/crt0.S @@ -49,8 +49,8 @@ vectors: /* Add some strings to detect the bootloader in flash and give it a version * number. (0x040A0028, 0x040A002C) */ -.string "ROCKBOX" -.word 0x0001 +.string "ROCKBOX\0" +.string "R 03.00\0" /* * Function: word_copy @@ -99,6 +99,18 @@ start: cmp r0, #0xA0000 bne poweron + /* Did an RTC event wake the player up? */ + + mov r2, #0x4A000000 + ldr r1, [r2] + ands r1, r1, #0x40000000 + + /* Woke up with the alarm - store a flag in GSTATUS3 */ + ldrne r2, =0x560000b8 + movne r1, #0x01 + strne r1, [r2] + bne poweron + /* Set GPG up to read power and menu status */ ldr r2, =0x56000050 ldr r1, [r2, #0x18] -- cgit v1.2.3