summaryrefslogtreecommitdiffstats
path: root/firmware/target/arm/tcc780x
diff options
context:
space:
mode:
authorJonathan Gordon <rockbox@jdgordon.info>2010-06-21 10:51:39 +0000
committerJonathan Gordon <rockbox@jdgordon.info>2010-06-21 10:51:39 +0000
commite7a4b96f6eba8c6b3842d1768856f7b354b3d1dd (patch)
treebd8ab8cfdb2c1bc09e5d5f96386562d422595199 /firmware/target/arm/tcc780x
parent816fca820caa537a07c761f49d1f8ecf996a91ce (diff)
downloadrockbox-e7a4b96f6eba8c6b3842d1768856f7b354b3d1dd.tar.gz
rockbox-e7a4b96f6eba8c6b3842d1768856f7b354b3d1dd.zip
change the D2 bootloader to boot rockbox by default. boot OF is hold is on or usb is connected
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27007 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/target/arm/tcc780x')
-rw-r--r--firmware/target/arm/tcc780x/crt0.S8
1 files changed, 6 insertions, 2 deletions
diff --git a/firmware/target/arm/tcc780x/crt0.S b/firmware/target/arm/tcc780x/crt0.S
index f6eb6afbe9..1612973866 100644
--- a/firmware/target/arm/tcc780x/crt0.S
+++ b/firmware/target/arm/tcc780x/crt0.S
@@ -74,14 +74,18 @@ start_loc:
ldr r0, =0xf005a000
ldr r0, [r0, #0x20] /* Read GPIO A */
tst r0, #0x8
- ldrne pc, [pc, #-28] /* Jump to original firmware if HOLD not pressed */
+ ldreq pc, [pc, #-28] /* Jump to original firmware if HOLD pressed */
+ ldr r0, =0xf005a000
+ ldr r0, [r0, #0x60] /* Read GPIO C */
+ tst r0, #0x4000000
+ ldreq pc, [pc, #-44] /* Jump to original firmware if usb connected */
#else
#error No bootup key detection implemented for this target
#endif
/* Copy bootloader to safe area - 0x21F00000 (end of DRAM) */
/* TODO: Adjust this for other targets - DRAM + DRAMSIZE - 0x100000 */
- ldr r0, [pc, #-28]
+ ldr r0, [pc, #-44]
mov r1, #0x22000000
sub r1, r1, #0x100000
ldr r2, =_dataend