From e085a51b07fc006ca4d6f3c4f3587bcf759d03c3 Mon Sep 17 00:00:00 2001 From: Linus Nielsen Feltzing Date: Sun, 6 Feb 2005 02:58:43 +0000 Subject: iriver: fixed ATA enable setup git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5806 a1c6a512-1295-4272-9138-f99709370657 --- firmware/drivers/ata.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/firmware/drivers/ata.c b/firmware/drivers/ata.c index 204edb524a..4f439895b4 100644 --- a/firmware/drivers/ata.c +++ b/firmware/drivers/ata.c @@ -1189,7 +1189,13 @@ void ata_enable(bool on) or_b(0x80, &PAIORL); #elif CONFIG_CPU == MCF5249 - (void)on; /* FIXME */ + if(on) + GPIO_OUT &= ~0x0040000; + else + GPIO_OUT |= 0x0040000; + + GPIO_ENABLE |= 0x00040000; + GPIO_FUNCTION |= 0x00040000; #endif } @@ -1356,6 +1362,12 @@ int ata_init(void) or_b(0x02, &PADRH); /* release ATA reset */ PACR2 &= 0xBFFF; /* GPIO function for PA7 (IDE enable) */ #elif defined HAVE_MCF5249 + /* Enable disk LED & ISD chip power control */ + GPIO_OUT &= ~0x0000200; + GPIO_ENABLE |= 0x00000240; + GPIO_FUNCTION |= 0x00000200; + + /* ATA reset */ GPIO_OUT |= 0x00080000; GPIO_ENABLE |= 0x00080000; GPIO_FUNCTION |= 0x00080000; -- cgit v1.2.3