From abce1b9927d7d2f9ae69fae1e35c4a400db7e9cf Mon Sep 17 00:00:00 2001 From: Andree Buschmann Date: Sat, 20 Mar 2010 12:30:18 +0000 Subject: 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 --- firmware/target/arm/ipod/power-ipod.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/firmware/target/arm/ipod/power-ipod.c b/firmware/target/arm/ipod/power-ipod.c index 46701c8d3f..897527f6aa 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 */ -- cgit v1.2.3