diff options
author | Linus Nielsen Feltzing <linus@haxx.se> | 2004-10-07 11:31:28 +0000 |
---|---|---|
committer | Linus Nielsen Feltzing <linus@haxx.se> | 2004-10-07 11:31:28 +0000 |
commit | 9411db3b4bfe9ecfcbef3b736ceecd87040887ad (patch) | |
tree | e4768b6f9e98345680f169b3bb435cb504fbbdec /firmware/crt0.S | |
parent | 5e1e1b6b076748b39fc0f4e9b8a5d9c0e1cd11a4 (diff) | |
download | rockbox-9411db3b4bfe9ecfcbef3b736ceecd87040887ad.tar.gz rockbox-9411db3b4bfe9ecfcbef3b736ceecd87040887ad.zip |
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
Diffstat (limited to 'firmware/crt0.S')
-rw-r--r-- | firmware/crt0.S | 36 |
1 files changed, 35 insertions, 1 deletions
diff --git a/firmware/crt0.S b/firmware/crt0.S index e33faa66e5..f66a0fb3cf 100644 --- a/firmware/crt0.S +++ b/firmware/crt0.S | |||
@@ -16,10 +16,43 @@ | |||
16 | * KIND, either express or implied. | 16 | * KIND, either express or implied. |
17 | * | 17 | * |
18 | ****************************************************************************/ | 18 | ****************************************************************************/ |
19 | #include "config.h" | ||
20 | #include "cpu.h" | ||
19 | .section .init.text | 21 | .section .init.text |
20 | .global start | 22 | .global start |
21 | start: | 23 | start: |
22 | /* We begin with some tricks. If we have built our code to be loaded | 24 | #ifdef IRIVER_H100 |
25 | /* Platform: iRiver H1xx */ | ||
26 | move.w #0x2700,%sr | ||
27 | |||
28 | move.l #MBAR+1,%d0 | ||
29 | movec.l %d0,%mbar | ||
30 | |||
31 | move.l #MBAR2+1,%d0 | ||
32 | movec.l %d0,%mbar2 | ||
33 | |||
34 | /* Test code: blink the backlight */ | ||
35 | lea MBAR2,%a0 | ||
36 | move.l #0x00020000,%d0 | ||
37 | move.l %d0,(0xbc,%a0) /* Function = 1 */ | ||
38 | move.l %d0,(0xb8,%a0) /* Enable = 1 */ | ||
39 | |||
40 | .blinkloop: | ||
41 | eor.l %d0,(0xb4,%a0) | ||
42 | |||
43 | move.l #2000000,%d2 | ||
44 | .delay: | ||
45 | subq.l #1,%d2 | ||
46 | bne .delay | ||
47 | jmp .blinkloop | ||
48 | |||
49 | .section .resetvectors | ||
50 | vectors: | ||
51 | .long _stackend | ||
52 | .long start | ||
53 | #else | ||
54 | /* Platform: Archos Jukebox | ||
55 | * We begin with some tricks. If we have built our code to be loaded | ||
23 | * via the standalone GDB stub, we will have out VBR at some other | 56 | * via the standalone GDB stub, we will have out VBR at some other |
24 | * location than 0x9000000. We must copy the trap vectors for the | 57 | * location than 0x9000000. We must copy the trap vectors for the |
25 | * GDB stub to our vector table. | 58 | * GDB stub to our vector table. |
@@ -185,3 +218,4 @@ vectors: | |||
185 | .long _stackend | 218 | .long _stackend |
186 | .long start | 219 | .long start |
187 | .long _stackend | 220 | .long _stackend |
221 | #endif | ||