1
0
Fork 0
forked from len0rd/rockbox

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
This commit is contained in:
Andree Buschmann 2010-03-20 12:30:18 +00:00
parent 43f2382c3a
commit abce1b9927

View file

@ -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 */