summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTorne Wuff <torne@wolfpuppy.org.uk>2010-05-02 09:41:28 +0000
committerTorne Wuff <torne@wolfpuppy.org.uk>2010-05-02 09:41:28 +0000
commit5b4a84a4cec889e31b04157e40d17cebadb04a39 (patch)
tree5e679e568b8fca4070755763ad6ff8c08ab62c87
parent9f157ad584f50402e44a8055c2dd42b9839d9f2f (diff)
downloadrockbox-5b4a84a4cec889e31b04157e40d17cebadb04a39.tar.gz
rockbox-5b4a84a4cec889e31b04157e40d17cebadb04a39.tar.bz2
rockbox-5b4a84a4cec889e31b04157e40d17cebadb04a39.zip
FS#11149: alternative fix for ipod startup/shutdown issue
Instead of using the OF's low-battery handler to force a shutdown which appears to have numerous unwanted side effects, just clear the end of IRAM before shutting down which appears to solve the original "ipod sometimes needs hard reset to turn on" issue. If you experience the "need hard reset" issue after this commit, please let us know. It has been tested on several models but we still don't know for sure what the original problem was. ;) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25772 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--firmware/target/arm/ipod/power-ipod.c29
-rw-r--r--manual/rockbox_interface/main.tex6
2 files changed, 10 insertions, 25 deletions
diff --git a/firmware/target/arm/ipod/power-ipod.c b/firmware/target/arm/ipod/power-ipod.c
index 14c8bf21e1..4266aad896 100644
--- a/firmware/target/arm/ipod/power-ipod.c
+++ b/firmware/target/arm/ipod/power-ipod.c
@@ -29,9 +29,6 @@
#include "usb.h"
#include "lcd.h"
#include "string.h"
-#if CONFIG_CPU == PP5022 || CONFIG_CPU == PP5020
-#include "rtc.h"
-#endif
void power_init(void)
{
@@ -167,26 +164,20 @@ void power_off(void)
#endif
#ifndef BOOTLOADER
-#if CONFIG_CPU == PP5022 || CONFIG_CPU == PP5020
- /* When shut down by OF, wakeup via alarm is enabled. This resets the
- alarm time so an unintended wakeup does not occur. */
- if (!(pcf50605_wakeup_flags & 0x10))
- rtc_enable_alarm(false);
-#endif
-#if defined(IPOD_1G2G)
+#ifdef IPOD_1G2G
/* we cannot turn off the 1st gen/ 2nd gen yet. Need to figure out sleep mode. */
system_reboot();
-#elif CONFIG_CPU == PP5022
- /* The OF in flash assumes boot failed because the battery is low.
- If there is no charger connected, this leads to a shutdown.
- */
- memcpy((void *)(0x4001ff00+8), "booting!", 8);
- system_reboot();
-#elif CONFIG_CPU == PP5020
- memcpy((void *)(0x40017f00+8), "booting!", 8);
- system_reboot();
#else
/* We don't turn off the ipod, we put it in a deep sleep */
+ /* Clear latter part of iram (the part used by plugins/codecs) to ensure
+ * that the OF behaves properly on boot. There is some kind of boot
+ * failure flag there which otherwise may not be cleared.
+ */
+#if CONFIG_CPU == PP5022
+ memset((void*)0x4000c000, 0, 0x14000);
+#elif CONFIG_CPU == PP5020
+ memset((void*)0x4000c000, 0, 0xc000);
+#endif
pcf50605_standby_mode();
#endif
#endif
diff --git a/manual/rockbox_interface/main.tex b/manual/rockbox_interface/main.tex
index 3103883a4d..9a69dde57a 100644
--- a/manual/rockbox_interface/main.tex
+++ b/manual/rockbox_interface/main.tex
@@ -516,12 +516,6 @@ To turn on and off your Rockbox enabled \dap{} use the following keys:
\label{ref:Safeshutdown}On shutdown, Rockbox automatically saves its settings.
-\opt{ipod4g,ipodcolor,ipodvideo,ipodnano,ipodmini}{%
- A low-battery symbol may appear briefly on the screen during shutdown. This
- is a side effect of the shutdown process and does not mean the battery is
- actually low.
-}%
-
\opt{IRIVER_H100_PAD,IRIVER_H300_PAD,IAUDIO_X5_PAD,SANSA_E200_PAD%
,SANSA_C200_PAD,IRIVER_H10_PAD,IPOD_4G_PAD,GIGABEAT_PAD}{%
If you have problems with your settings, such as accidentally having