summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinus Nielsen Feltzing <linus@haxx.se>2004-10-07 11:31:28 +0000
committerLinus Nielsen Feltzing <linus@haxx.se>2004-10-07 11:31:28 +0000
commit9411db3b4bfe9ecfcbef3b736ceecd87040887ad (patch)
treee4768b6f9e98345680f169b3bb435cb504fbbdec
parent5e1e1b6b076748b39fc0f4e9b8a5d9c0e1cd11a4 (diff)
downloadrockbox-9411db3b4bfe9ecfcbef3b736ceecd87040887ad.zip
rockbox-9411db3b4bfe9ecfcbef3b736ceecd87040887ad.tar.gz
rockbox-9411db3b4bfe9ecfcbef3b736ceecd87040887ad.tar.bz2
rockbox-9411db3b4bfe9ecfcbef3b736ceecd87040887ad.tar.xz
First iRiver startup code, does nothing but blink the backlight
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5212 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--firmware/crt0.S36
1 files changed, 35 insertions, 1 deletions
diff --git a/firmware/crt0.S b/firmware/crt0.S
index e33faa6..f66a0fb 100644
--- a/firmware/crt0.S
+++ b/firmware/crt0.S
@@ -16,10 +16,43 @@
* KIND, either express or implied.
*
****************************************************************************/
+ #include "config.h"
+ #include "cpu.h"
.section .init.text
.global start
start:
- /* We begin with some tricks. If we have built our code to be loaded
+#ifdef IRIVER_H100
+ /* Platform: iRiver H1xx */
+ move.w #0x2700,%sr
+
+ move.l #MBAR+1,%d0
+ movec.l %d0,%mbar
+
+ move.l #MBAR2+1,%d0
+ movec.l %d0,%mbar2
+
+ /* Test code: blink the backlight */
+ lea MBAR2,%a0
+ move.l #0x00020000,%d0
+ move.l %d0,(0xbc,%a0) /* Function = 1 */
+ move.l %d0,(0xb8,%a0) /* Enable = 1 */
+
+.blinkloop:
+ eor.l %d0,(0xb4,%a0)
+
+ move.l #2000000,%d2
+.delay:
+ subq.l #1,%d2
+ bne .delay
+ jmp .blinkloop
+
+ .section .resetvectors
+vectors:
+ .long _stackend
+ .long start
+#else
+ /* Platform: Archos Jukebox
+ * We begin with some tricks. If we have built our code to be loaded
* via the standalone GDB stub, we will have out VBR at some other
* location than 0x9000000. We must copy the trap vectors for the
* GDB stub to our vector table.
@@ -185,3 +218,4 @@ vectors:
.long _stackend
.long start
.long _stackend
+#endif