summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Arigo <markarigo@gmail.com>2007-09-27 02:50:50 +0000
committerMark Arigo <markarigo@gmail.com>2007-09-27 02:50:50 +0000
commit61a83c02a3f0812c54cc9c41d2c1002af4c63f9e (patch)
tree9fe5725b0f0dcfd8468e53799e6a00d0743699de
parentd7c8cff3d827b5de1be4968aec623844a84a1b8c (diff)
downloadrockbox-61a83c02a3f0812c54cc9c41d2c1002af4c63f9e.tar.gz
rockbox-61a83c02a3f0812c54cc9c41d2c1002af4c63f9e.zip
Sansa c200: fix system_reboot with some magic from the OF. Reboot to the OF when usb is inserted.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14862 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--firmware/target/arm/sandisk/ata-c200_e200.c4
-rw-r--r--firmware/target/arm/system-pp502x.c9
-rw-r--r--firmware/target/arm/usb-fw-pp502x.c3
3 files changed, 15 insertions, 1 deletions
diff --git a/firmware/target/arm/sandisk/ata-c200_e200.c b/firmware/target/arm/sandisk/ata-c200_e200.c
index addc490417..7cf317109e 100644
--- a/firmware/target/arm/sandisk/ata-c200_e200.c
+++ b/firmware/target/arm/sandisk/ata-c200_e200.c
@@ -1087,6 +1087,10 @@ void ata_sleep(void)
1087{ 1087{
1088} 1088}
1089 1089
1090void ata_sleepnow(void)
1091{
1092}
1093
1090void ata_spin(void) 1094void ata_spin(void)
1091{ 1095{
1092} 1096}
diff --git a/firmware/target/arm/system-pp502x.c b/firmware/target/arm/system-pp502x.c
index 64153eefc4..a234edab8c 100644
--- a/firmware/target/arm/system-pp502x.c
+++ b/firmware/target/arm/system-pp502x.c
@@ -255,7 +255,16 @@ void system_init(void)
255void system_reboot(void) 255void system_reboot(void)
256{ 256{
257 /* Reboot */ 257 /* Reboot */
258#ifdef SANSA_C200
259 CACHE_CTL &= ~0x10;
260
261 /* Magic used by the c200 OF. The BL uses a magic value of 0x23066b7b.
262 In both cases, the OF executes these 2 commands from iram. */
263 outl(0x23066000, 0x70000008);
264 DEV_RS = DEV_SYSTEM;
265#else
258 DEV_RS |= DEV_SYSTEM; 266 DEV_RS |= DEV_SYSTEM;
267#endif
259} 268}
260 269
261int system_memory_guard(int newmode) 270int system_memory_guard(int newmode)
diff --git a/firmware/target/arm/usb-fw-pp502x.c b/firmware/target/arm/usb-fw-pp502x.c
index be37b8b710..a5afc20056 100644
--- a/firmware/target/arm/usb-fw-pp502x.c
+++ b/firmware/target/arm/usb-fw-pp502x.c
@@ -100,7 +100,8 @@ void usb_enable(bool on)
100 handling, which should be the same for all PP502x targets. */ 100 handling, which should be the same for all PP502x targets. */
101 if (on) 101 if (on)
102 { 102 {
103#if defined(IPOD_ARCH) || defined(IRIVER_H10) || defined (IRIVER_H10_5GB) 103#if defined(IPOD_ARCH) || defined(IRIVER_H10) || defined (IRIVER_H10_5GB) ||\
104 defined(SANSA_C200)
104 /* For the H10 and iPod, we can only do one thing with USB mode - reboot 105 /* For the H10 and iPod, we can only do one thing with USB mode - reboot
105 into the flash-based disk-mode. This does not return. */ 106 into the flash-based disk-mode. This does not return. */
106 107