summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndree Buschmann <AndreeBuschmann@t-online.de>2010-03-20 12:30:18 +0000
committerAndree Buschmann <AndreeBuschmann@t-online.de>2010-03-20 12:30:18 +0000
commitabce1b9927d7d2f9ae69fae1e35c4a400db7e9cf (patch)
tree733730fbf1698c65b8711121541463f01e1b32c5
parent43f2382c3a2fea60785b00f375c7a7080e406371 (diff)
downloadrockbox-abce1b9927d7d2f9ae69fae1e35c4a400db7e9cf.zip
rockbox-abce1b9927d7d2f9ae69fae1e35c4a400db7e9cf.tar.gz
rockbox-abce1b9927d7d2f9ae69fae1e35c4a400db7e9cf.tar.bz2
rockbox-abce1b9927d7d2f9ae69fae1e35c4a400db7e9cf.tar.xz
Submit FS#9746 by Boris Gjenero. Set PP502x IDE pins low for iPod Video when IDE power is off. Done by OF the same way, might be used by other targets as well.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25255 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--firmware/target/arm/ipod/power-ipod.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/firmware/target/arm/ipod/power-ipod.c b/firmware/target/arm/ipod/power-ipod.c
index 46701c8..897527f 100644
--- a/firmware/target/arm/ipod/power-ipod.c
+++ b/firmware/target/arm/ipod/power-ipod.c
@@ -117,11 +117,22 @@ void ide_power_enable(bool on)
if (on)
{
GPO32_VAL &= ~0x40000000;
+ sleep(1); /* only need 4 ms */
DEV_EN |= DEV_IDE0;
+ GPIOG_ENABLE = 0;
+ GPIOH_ENABLE = 0;
+ GPIOI_ENABLE &= 0x40;
+ GPIOK_ENABLE &= 0XE0;
+ udelay(10);
}
else
{
DEV_EN &= ~DEV_IDE0;
+ udelay(10);
+ GPIOG_ENABLE = 0xFF;
+ GPIOH_ENABLE = 0xFF;
+ GPIOI_ENABLE |= 0xBF;
+ GPIOK_ENABLE |= 0x1F;
GPO32_VAL |= 0x40000000;
}
#else /* Nano */