summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Nielsen Feltzing <linus@haxx.se>2005-05-20 18:15:14 +0000
committerLinus Nielsen Feltzing <linus@haxx.se>2005-05-20 18:15:14 +0000
commit3beafe4c44987d339a34be3dd1d19fefdb62df88 (patch)
tree80362131fe32ba09e50c3df37a533bc794335d7b
parent1b9ea4e19cc42824e3b44f2bdfd1c149656eb8a8 (diff)
downloadrockbox-3beafe4c44987d339a34be3dd1d19fefdb62df88.tar.gz
rockbox-3beafe4c44987d339a34be3dd1d19fefdb62df88.tar.bz2
rockbox-3beafe4c44987d339a34be3dd1d19fefdb62df88.zip
Added system_reboot() for iRiver
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6491 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--firmware/system.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/firmware/system.c b/firmware/system.c
index 3253d3d7c5..be6be1dfaa 100644
--- a/firmware/system.c
+++ b/firmware/system.c
@@ -1065,8 +1065,20 @@ int system_memory_guard(int newmode)
(void)newmode;
return 0;
}
+
void system_reboot (void)
{
- /* dummy */
+#if CONFIG_CPU == MCF5249
+ set_cpu_frequency(0);
+
+ asm(" move.w #0x2700,%sr");
+ /* Reset the cookie for the crt0 crash check */
+ asm(" move.l #0,%d0");
+ asm(" move.l %d0,0x10017ffc");
+ asm(" movec.l %d0,%vbr");
+ asm(" move.l 0,%sp");
+ asm(" move.l 4,%a0");
+ asm(" jmp (%a0)");
+#endif
}
#endif