summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Kurbjun <kkurbjun@gmail.com>2008-09-26 03:08:19 +0000
committerKarl Kurbjun <kkurbjun@gmail.com>2008-09-26 03:08:19 +0000
commit3ef51c5cbb67e03ab40b45714f05b589e044550f (patch)
tree9e31571ab46e53157072b9eceb183c2d8e0bbd11
parent143b8f1c305cf740b2598fafa6ccc517b8915f1a (diff)
Add the shutdown routine necessary when bootloader is flashed. Normal build/bootloader still operate as expected.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18651 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--firmware/target/arm/s3c2440/gigabeat-fx/power-meg-fx.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/firmware/target/arm/s3c2440/gigabeat-fx/power-meg-fx.c b/firmware/target/arm/s3c2440/gigabeat-fx/power-meg-fx.c
index d920b005f6..544869ab6c 100644
--- a/firmware/target/arm/s3c2440/gigabeat-fx/power-meg-fx.c
+++ b/firmware/target/arm/s3c2440/gigabeat-fx/power-meg-fx.c
@@ -64,12 +64,23 @@ bool ide_powered(void)
void power_off(void)
{
+ int(*reboot_point)(void);
+ reboot_point=(void*)(unsigned char*) 0x00000000;
/* turn off backlight and wait for 1 second */
_backlight_off();
_buttonlight_off();
sleep(HZ);
- /* set SLEEP bit to on in CLKCON to turn off */
+
+ /* Rockbox never properly shutdown the player. When the sleep bit is set
+ * the player actually wakes up in some type of "zombie" state
+ * because the shutdown routine is not set up properly. So far the
+ * shutdown routines tried leave the player consuming excess power
+ * so we rely on the OF to shut everything down instead. (mmu apears to be
+ * reset when the sleep bit is set)
+ */
CLKCON |=(1<<3);
+
+ reboot_point();
}
#else /* SIMULATOR */