summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Chapman <dave@dchapman.com>2006-01-19 03:01:34 +0000
committerDave Chapman <dave@dchapman.com>2006-01-19 03:01:34 +0000
commit7cc6b3a3596c64d7fb5aeff0f6a63783e929d510 (patch)
tree37cb409311041f000310020241fe1681e5de2bf8
parent0ee0c7713987960a041ab929b7147900452fb1cb (diff)
downloadrockbox-7cc6b3a3596c64d7fb5aeff0f6a63783e929d510.tar.gz
rockbox-7cc6b3a3596c64d7fb5aeff0f6a63783e929d510.zip
Fix reboot-to-diskmode for the Nano and Video - the "diskmode" string is written to the end of IRAM, which is larger on the PP5022 devices.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8378 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--firmware/usb.c17
1 files changed, 7 insertions, 10 deletions
diff --git a/firmware/usb.c b/firmware/usb.c
index 2cbe0348e5..13006ab4ea 100644
--- a/firmware/usb.c
+++ b/firmware/usb.c
@@ -168,17 +168,14 @@ void usb_enable(bool on)
168 into Apple's flash-based disk-mode. This does not return. */ 168 into Apple's flash-based disk-mode. This does not return. */
169 if (on) 169 if (on)
170 { 170 {
171 /* The following code is copied from ipodlinux - it doesn't work on the 171 /* The following code is copied from ipodlinux */
172 iPod Video */ 172#ifdef APPLE_IPODCOLOR
173 unsigned char* storage_ptr = (unsigned char *)0x40017F00; 173 unsigned char* storage_ptr = (unsigned char *)0x40017F00;
174 char* diskmode = "diskmode\0"; 174#elif defined(APPLE_IPODNANO) || defined(APPLE_IPODVIDEO)
175 char* hotstuff = "hotstuff\0"; 175 unsigned char* storage_ptr = (unsigned char *)0x4001FF00;
176 176#endif
177 memcpy(storage_ptr, diskmode, 9); 177 memcpy(storage_ptr, "diskmode\0\0hotstuff\0\0\1", 21);
178 storage_ptr = (unsigned char *)0x40017f08; 178 DEV_RS |= 4; /* Reboot */
179 memcpy(storage_ptr, hotstuff, 9);
180 outl(1, 0x40017F10);
181 outl(inl(0x60006004) | 0x4, 0x60006004);
182 } 179 }
183#elif defined(USB_ISP1582) 180#elif defined(USB_ISP1582)
184 /* TODO: Implement USB_ISP1582 */ 181 /* TODO: Implement USB_ISP1582 */