1
0
Fork 0
forked from len0rd/rockbox

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
This commit is contained in:
Mark Arigo 2007-09-27 02:50:50 +00:00
parent d7c8cff3d8
commit 61a83c02a3
3 changed files with 15 additions and 1 deletions

View file

@ -1087,6 +1087,10 @@ void ata_sleep(void)
{
}
void ata_sleepnow(void)
{
}
void ata_spin(void)
{
}

View file

@ -255,7 +255,16 @@ void system_init(void)
void system_reboot(void)
{
/* Reboot */
#ifdef SANSA_C200
CACHE_CTL &= ~0x10;
/* Magic used by the c200 OF. The BL uses a magic value of 0x23066b7b.
In both cases, the OF executes these 2 commands from iram. */
outl(0x23066000, 0x70000008);
DEV_RS = DEV_SYSTEM;
#else
DEV_RS |= DEV_SYSTEM;
#endif
}
int system_memory_guard(int newmode)

View file

@ -100,7 +100,8 @@ void usb_enable(bool on)
handling, which should be the same for all PP502x targets. */
if (on)
{
#if defined(IPOD_ARCH) || defined(IRIVER_H10) || defined (IRIVER_H10_5GB)
#if defined(IPOD_ARCH) || defined(IRIVER_H10) || defined (IRIVER_H10_5GB) ||\
defined(SANSA_C200)
/* For the H10 and iPod, we can only do one thing with USB mode - reboot
into the flash-based disk-mode. This does not return. */