diff options
-rw-r--r-- | bootloader/SOURCES | 1 | ||||
-rw-r--r-- | bootloader/ipodnano2g.c | 9 | ||||
-rw-r--r-- | firmware/target/arm/s5l8700/crt0.S | 14 |
3 files changed, 20 insertions, 4 deletions
diff --git a/bootloader/SOURCES b/bootloader/SOURCES index 459a1a27bf..d36479c4ee 100644 --- a/bootloader/SOURCES +++ b/bootloader/SOURCES | |||
@@ -54,4 +54,5 @@ lyre_proto1.c | |||
54 | show_logo.c | 54 | show_logo.c |
55 | #elif defined(IPOD_NANO2G) | 55 | #elif defined(IPOD_NANO2G) |
56 | ipodnano2g.c | 56 | ipodnano2g.c |
57 | show_logo.c | ||
57 | #endif | 58 | #endif |
diff --git a/bootloader/ipodnano2g.c b/bootloader/ipodnano2g.c index 637d405f01..e8e8e2e1a4 100644 --- a/bootloader/ipodnano2g.c +++ b/bootloader/ipodnano2g.c | |||
@@ -7,7 +7,7 @@ | |||
7 | * \/ \/ \/ \/ \/ | 7 | * \/ \/ \/ \/ \/ |
8 | * $Id$ | 8 | * $Id$ |
9 | * | 9 | * |
10 | * Copyright (C) 2009 by ???? [to be completed by first author] | 10 | * Copyright (C) 2009 by Dave Chapman |
11 | * | 11 | * |
12 | * This program is free software; you can redistribute it and/or | 12 | * This program is free software; you can redistribute it and/or |
13 | * modify it under the terms of the GNU General Public License | 13 | * modify it under the terms of the GNU General Public License |
@@ -46,8 +46,15 @@ | |||
46 | 46 | ||
47 | char version[] = APPSVERSION; | 47 | char version[] = APPSVERSION; |
48 | 48 | ||
49 | /* Show the Rockbox logo - in show_logo.c */ | ||
50 | extern int show_logo(void); | ||
51 | |||
49 | void main(void) | 52 | void main(void) |
50 | { | 53 | { |
54 | lcd_init(); | ||
55 | |||
56 | show_logo(); | ||
57 | |||
51 | /* Do nothing... */ | 58 | /* Do nothing... */ |
52 | while(1); | 59 | while(1); |
53 | } | 60 | } |
diff --git a/firmware/target/arm/s5l8700/crt0.S b/firmware/target/arm/s5l8700/crt0.S index 0dcc203844..c79897606c 100644 --- a/firmware/target/arm/s5l8700/crt0.S +++ b/firmware/target/arm/s5l8700/crt0.S | |||
@@ -45,10 +45,12 @@ _newstart: | |||
45 | newstart2: | 45 | newstart2: |
46 | msr cpsr_c, #0xd3 /* enter supervisor mode, disable IRQ/FIQ */ | 46 | msr cpsr_c, #0xd3 /* enter supervisor mode, disable IRQ/FIQ */ |
47 | 47 | ||
48 | #ifdef ROCKBOX_BIG_ENDIAN | ||
48 | mov r1, #0x80 | 49 | mov r1, #0x80 |
49 | mrc 15, 0, r0, c1, c0, 0 | 50 | mrc 15, 0, r0, c1, c0, 0 |
50 | orr r0, r0, r1 | 51 | orr r0, r0, r1 |
51 | mcr 15, 0, r0, c1, c0, 0 // set bigendian | 52 | mcr 15, 0, r0, c1, c0, 0 // set bigendian |
53 | #endif | ||
52 | 54 | ||
53 | ldr r1, =0x3c800000 // disable watchdog | 55 | ldr r1, =0x3c800000 // disable watchdog |
54 | mov r0, #0xa5 | 56 | mov r0, #0xa5 |
@@ -66,7 +68,7 @@ newstart2: | |||
66 | str r0, [r1] // clear pending interrupts | 68 | str r0, [r1] // clear pending interrupts |
67 | ldr r1, =0x39c0001c | 69 | ldr r1, =0x39c0001c |
68 | str r0, [r1] // clear pending external interrupts | 70 | str r0, [r1] // clear pending external interrupts |
69 | 71 | ||
70 | // ldr r1, =0x3cf00000 | 72 | // ldr r1, =0x3cf00000 |
71 | // ldr r0, [r1] | 73 | // ldr r0, [r1] |
72 | // mvn r2, #0x30 | 74 | // mvn r2, #0x30 |
@@ -80,6 +82,7 @@ newstart2: | |||
80 | // orr r0, r0, r2 | 82 | // orr r0, r0, r2 |
81 | // str r0, [r1] // switch backlight on | 83 | // str r0, [r1] // switch backlight on |
82 | 84 | ||
85 | #if CONFIG_CPU==S5L8700 | ||
83 | ldr r1, =0x3c500000 // CLKCON | 86 | ldr r1, =0x3c500000 // CLKCON |
84 | ldr r0, =0x00800080 | 87 | ldr r0, =0x00800080 |
85 | str r0, [r1] | 88 | str r0, [r1] |
@@ -232,6 +235,7 @@ newstart2: | |||
232 | ldrhi r1, [r4], #4 | 235 | ldrhi r1, [r4], #4 |
233 | strhi r1, [r2], #4 | 236 | strhi r1, [r2], #4 |
234 | bhi 1b | 237 | bhi 1b |
238 | #endif | ||
235 | 239 | ||
236 | /* Initialise bss section to zero */ | 240 | /* Initialise bss section to zero */ |
237 | ldr r2, =_edata | 241 | ldr r2, =_edata |
@@ -241,7 +245,8 @@ newstart2: | |||
241 | cmp r3, r2 | 245 | cmp r3, r2 |
242 | strhi r4, [r2], #4 | 246 | strhi r4, [r2], #4 |
243 | bhi 1b | 247 | bhi 1b |
244 | 248 | ||
249 | #if CONFIG_CPU==S5L8700 | ||
245 | /* Copy icode and data to ram */ | 250 | /* Copy icode and data to ram */ |
246 | ldr r2, =_datastart | 251 | ldr r2, =_datastart |
247 | ldr r3, =_dataend | 252 | ldr r3, =_dataend |
@@ -251,6 +256,7 @@ newstart2: | |||
251 | ldrhi r1, [r4], #4 | 256 | ldrhi r1, [r4], #4 |
252 | strhi r1, [r2], #4 | 257 | strhi r1, [r2], #4 |
253 | bhi 1b | 258 | bhi 1b |
259 | #endif | ||
254 | 260 | ||
255 | /* Set up some stack and munge it with 0xdeadbeef */ | 261 | /* Set up some stack and munge it with 0xdeadbeef */ |
256 | ldr sp, =_stackend | 262 | ldr sp, =_stackend |
@@ -260,7 +266,7 @@ newstart2: | |||
260 | cmp sp, r2 | 266 | cmp sp, r2 |
261 | strhi r3, [r2], #4 | 267 | strhi r3, [r2], #4 |
262 | bhi 1b | 268 | bhi 1b |
263 | 269 | ||
264 | /* Set up stack for IRQ mode */ | 270 | /* Set up stack for IRQ mode */ |
265 | msr cpsr_c, #0xd2 | 271 | msr cpsr_c, #0xd2 |
266 | ldr sp, =_irqstackend | 272 | ldr sp, =_irqstackend |
@@ -281,6 +287,7 @@ newstart2: | |||
281 | // if we did not switch remap on, device | 287 | // if we did not switch remap on, device |
282 | // would crash when MENU is pressed, | 288 | // would crash when MENU is pressed, |
283 | // as that button is connected to BOOT_MODE pin | 289 | // as that button is connected to BOOT_MODE pin |
290 | #if CONFIG_CPU==S5L8700 | ||
284 | ldr r1, =0x38200000 | 291 | ldr r1, =0x38200000 |
285 | ldr r0, [r1] | 292 | ldr r0, [r1] |
286 | mvn r2, #0x10000 | 293 | mvn r2, #0x10000 |
@@ -288,6 +295,7 @@ newstart2: | |||
288 | mov r2, #0x1 | 295 | mov r2, #0x1 |
289 | orr r0, r0, r2 | 296 | orr r0, r0, r2 |
290 | str r0, [r1] // remap iram to address 0x0 | 297 | str r0, [r1] // remap iram to address 0x0 |
298 | #endif | ||
291 | 299 | ||
292 | bl main | 300 | bl main |
293 | 301 | ||