diff options
author | Torne Wuff <torne@wolfpuppy.org.uk> | 2010-01-09 19:04:51 +0000 |
---|---|---|
committer | Torne Wuff <torne@wolfpuppy.org.uk> | 2010-01-09 19:04:51 +0000 |
commit | d4bfc1523268213437c1506ebd3857521b530144 (patch) | |
tree | 4e7c8d7897095e992df1cbaa4e44caf3312765b7 | |
parent | f736159e5c0fe543aac10c5cd44ea1e0ede264ef (diff) | |
download | rockbox-d4bfc1523268213437c1506ebd3857521b530144.tar.gz rockbox-d4bfc1523268213437c1506ebd3857521b530144.zip |
FS#10107: work around the issue on some ipods where after shutdown they do not power on.
Some ipods do not power on correctly after being shut down and require a hard
reset before they work again. This workaround shuts the device down via the OF
which prevents the problem from occurring. There is a cosmetic effect: the low
battery symbol appears briefly on power of.
Change applies to PP502x ipods: 4G/photo/video/mini1g/mini2g/nano1g
Patch by Boris Gjenero (dreamlayers), manual changes by me.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24207 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r-- | firmware/target/arm/ipod/power-ipod.c | 21 | ||||
-rw-r--r-- | manual/rockbox_interface/main.tex | 6 |
2 files changed, 26 insertions, 1 deletions
diff --git a/firmware/target/arm/ipod/power-ipod.c b/firmware/target/arm/ipod/power-ipod.c index 0b516466fe..46701c8d3f 100644 --- a/firmware/target/arm/ipod/power-ipod.c +++ b/firmware/target/arm/ipod/power-ipod.c | |||
@@ -28,6 +28,10 @@ | |||
28 | #include "pcf50605.h" | 28 | #include "pcf50605.h" |
29 | #include "usb.h" | 29 | #include "usb.h" |
30 | #include "lcd.h" | 30 | #include "lcd.h" |
31 | #include "string.h" | ||
32 | #if CONFIG_CPU == PP5022 || CONFIG_CPU == PP5020 | ||
33 | #include "rtc.h" | ||
34 | #endif | ||
31 | 35 | ||
32 | void power_init(void) | 36 | void power_init(void) |
33 | { | 37 | { |
@@ -152,9 +156,24 @@ void power_off(void) | |||
152 | #endif | 156 | #endif |
153 | 157 | ||
154 | #ifndef BOOTLOADER | 158 | #ifndef BOOTLOADER |
155 | #ifdef IPOD_1G2G | 159 | #if CONFIG_CPU == PP5022 || CONFIG_CPU == PP5020 |
160 | /* When shut down by OF, wakeup via alarm is enabled. This resets the | ||
161 | alarm time so an unintended wakeup does not occur. */ | ||
162 | if (!(pcf50605_wakeup_flags & 0x10)) | ||
163 | rtc_enable_alarm(false); | ||
164 | #endif | ||
165 | #if defined(IPOD_1G2G) | ||
156 | /* we cannot turn off the 1st gen/ 2nd gen yet. Need to figure out sleep mode. */ | 166 | /* we cannot turn off the 1st gen/ 2nd gen yet. Need to figure out sleep mode. */ |
157 | system_reboot(); | 167 | system_reboot(); |
168 | #elif CONFIG_CPU == PP5022 | ||
169 | /* The OF in flash assumes boot failed because the battery is low. | ||
170 | If there is no charger connected, this leads to a shutdown. | ||
171 | */ | ||
172 | memcpy((void *)(0x4001ff00+8), "booting!", 8); | ||
173 | system_reboot(); | ||
174 | #elif CONFIG_CPU == PP5020 | ||
175 | memcpy((void *)(0x40017f00+8), "booting!", 8); | ||
176 | system_reboot(); | ||
158 | #else | 177 | #else |
159 | /* We don't turn off the ipod, we put it in a deep sleep */ | 178 | /* We don't turn off the ipod, we put it in a deep sleep */ |
160 | pcf50605_standby_mode(); | 179 | pcf50605_standby_mode(); |
diff --git a/manual/rockbox_interface/main.tex b/manual/rockbox_interface/main.tex index 0bcee718d1..398766d5b9 100644 --- a/manual/rockbox_interface/main.tex +++ b/manual/rockbox_interface/main.tex | |||
@@ -495,6 +495,12 @@ To turn on and off your Rockbox enabled \dap{} use the following keys: | |||
495 | 495 | ||
496 | \label{ref:Safeshutdown}On shutdown, Rockbox automatically saves its settings. | 496 | \label{ref:Safeshutdown}On shutdown, Rockbox automatically saves its settings. |
497 | 497 | ||
498 | \opt{ipod4g,ipodcolor,ipodvideo,ipodnano,ipodmini}{% | ||
499 | A low-battery symbol may appear briefly on the screen during shutdown. This | ||
500 | is a side effect of the shutdown process and does not mean the battery is | ||
501 | actually low. | ||
502 | }% | ||
503 | |||
498 | \opt{IRIVER_H100_PAD,IRIVER_H300_PAD,IAUDIO_X5_PAD,SANSA_E200_PAD% | 504 | \opt{IRIVER_H100_PAD,IRIVER_H300_PAD,IAUDIO_X5_PAD,SANSA_E200_PAD% |
499 | ,SANSA_C200_PAD,IRIVER_H10_PAD,IPOD_4G_PAD,GIGABEAT_PAD}{% | 505 | ,SANSA_C200_PAD,IRIVER_H10_PAD,IPOD_4G_PAD,GIGABEAT_PAD}{% |
500 | If you have problems with your settings, such as accidentally having | 506 | If you have problems with your settings, such as accidentally having |