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
This commit is contained in:
Dave Chapman 2006-01-19 03:01:34 +00:00
parent 0ee0c77139
commit 7cc6b3a359

View file

@ -168,17 +168,14 @@ void usb_enable(bool on)
into Apple's flash-based disk-mode. This does not return. */ into Apple's flash-based disk-mode. This does not return. */
if (on) if (on)
{ {
/* The following code is copied from ipodlinux - it doesn't work on the /* The following code is copied from ipodlinux */
iPod Video */ #ifdef APPLE_IPODCOLOR
unsigned char* storage_ptr = (unsigned char *)0x40017F00; unsigned char* storage_ptr = (unsigned char *)0x40017F00;
char* diskmode = "diskmode\0"; #elif defined(APPLE_IPODNANO) || defined(APPLE_IPODVIDEO)
char* hotstuff = "hotstuff\0"; unsigned char* storage_ptr = (unsigned char *)0x4001FF00;
#endif
memcpy(storage_ptr, diskmode, 9); memcpy(storage_ptr, "diskmode\0\0hotstuff\0\0\1", 21);
storage_ptr = (unsigned char *)0x40017f08; DEV_RS |= 4; /* Reboot */
memcpy(storage_ptr, hotstuff, 9);
outl(1, 0x40017F10);
outl(inl(0x60006004) | 0x4, 0x60006004);
} }
#elif defined(USB_ISP1582) #elif defined(USB_ISP1582)
/* TODO: Implement USB_ISP1582 */ /* TODO: Implement USB_ISP1582 */