mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-10-14 02:27:39 -04:00
pp502x: Fully shut down storage power on older(4g/photo, mini, mini2g) iPods
On these older iPods, power was not being shut down completely, which led to a backfeed situation leading to decreased battery life and some stability issues. This was particuarly apparent when using SD card adapters that do not respect the ATA power management commands (ie all of them), as they never enter a low-power state on their own. With this change, there are reports of battery life exceeding 20 hours of continuous playback (~30% increase with CF cards, 3x improvement with SD cards) and appears to resolve intermittent wakeup stability issues with SD adapters. Change-Id: I46cfff7a59bb18a448989812303f30869df24d2d
This commit is contained in:
parent
f60892e26c
commit
4bde992ca3
1 changed files with 4 additions and 0 deletions
|
@ -106,12 +106,16 @@ void ide_power_enable(bool on)
|
||||||
if (on)
|
if (on)
|
||||||
{
|
{
|
||||||
GPIO_CLEAR_BITWISE(GPIOJ_OUTPUT_VAL, 0x04);
|
GPIO_CLEAR_BITWISE(GPIOJ_OUTPUT_VAL, 0x04);
|
||||||
|
GPIO_CLEAR_BITWISE(GPIOI_ENABLE, 0xBF);
|
||||||
|
GPIO_CLEAR_BITWISE(GPIOK_ENABLE, 0x1F);
|
||||||
DEV_EN |= DEV_IDE0;
|
DEV_EN |= DEV_IDE0;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
DEV_EN &= ~DEV_IDE0;
|
DEV_EN &= ~DEV_IDE0;
|
||||||
GPIO_SET_BITWISE(GPIOJ_OUTPUT_VAL, 0x04);
|
GPIO_SET_BITWISE(GPIOJ_OUTPUT_VAL, 0x04);
|
||||||
|
GPIO_SET_BITWISE(GPIOI_ENABLE, 0xBF);
|
||||||
|
GPIO_SET_BITWISE(GPIOK_ENABLE, 0x1F);
|
||||||
}
|
}
|
||||||
#elif defined(IPOD_VIDEO)
|
#elif defined(IPOD_VIDEO)
|
||||||
if (on)
|
if (on)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue