summaryrefslogtreecommitdiff
path: root/firmware
diff options
context:
space:
mode:
authorLinus Nielsen Feltzing <linus@haxx.se>2005-02-06 02:58:43 +0000
committerLinus Nielsen Feltzing <linus@haxx.se>2005-02-06 02:58:43 +0000
commite085a51b07fc006ca4d6f3c4f3587bcf759d03c3 (patch)
tree8a4ad56fab0630aa2ea01496c43d2eccdd6403b2 /firmware
parentf67bd4f2c80e664076dc38c31e4ec3c858d0586c (diff)
iriver: fixed ATA enable setup
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5806 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware')
-rw-r--r--firmware/drivers/ata.c14
1 files changed, 13 insertions, 1 deletions
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;