diff options
author | Linus Nielsen Feltzing <linus@haxx.se> | 2005-02-06 02:58:43 +0000 |
---|---|---|
committer | Linus Nielsen Feltzing <linus@haxx.se> | 2005-02-06 02:58:43 +0000 |
commit | e085a51b07fc006ca4d6f3c4f3587bcf759d03c3 (patch) | |
tree | 8a4ad56fab0630aa2ea01496c43d2eccdd6403b2 /firmware/drivers/ata.c | |
parent | f67bd4f2c80e664076dc38c31e4ec3c858d0586c (diff) | |
download | rockbox-e085a51b07fc006ca4d6f3c4f3587bcf759d03c3.tar.gz rockbox-e085a51b07fc006ca4d6f3c4f3587bcf759d03c3.zip |
iriver: fixed ATA enable setup
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5806 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/drivers/ata.c')
-rw-r--r-- | firmware/drivers/ata.c | 14 |
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) | |||
1189 | 1189 | ||
1190 | or_b(0x80, &PAIORL); | 1190 | or_b(0x80, &PAIORL); |
1191 | #elif CONFIG_CPU == MCF5249 | 1191 | #elif CONFIG_CPU == MCF5249 |
1192 | (void)on; /* FIXME */ | 1192 | if(on) |
1193 | GPIO_OUT &= ~0x0040000; | ||
1194 | else | ||
1195 | GPIO_OUT |= 0x0040000; | ||
1196 | |||
1197 | GPIO_ENABLE |= 0x00040000; | ||
1198 | GPIO_FUNCTION |= 0x00040000; | ||
1193 | #endif | 1199 | #endif |
1194 | } | 1200 | } |
1195 | 1201 | ||
@@ -1356,6 +1362,12 @@ int ata_init(void) | |||
1356 | or_b(0x02, &PADRH); /* release ATA reset */ | 1362 | or_b(0x02, &PADRH); /* release ATA reset */ |
1357 | PACR2 &= 0xBFFF; /* GPIO function for PA7 (IDE enable) */ | 1363 | PACR2 &= 0xBFFF; /* GPIO function for PA7 (IDE enable) */ |
1358 | #elif defined HAVE_MCF5249 | 1364 | #elif defined HAVE_MCF5249 |
1365 | /* Enable disk LED & ISD chip power control */ | ||
1366 | GPIO_OUT &= ~0x0000200; | ||
1367 | GPIO_ENABLE |= 0x00000240; | ||
1368 | GPIO_FUNCTION |= 0x00000200; | ||
1369 | |||
1370 | /* ATA reset */ | ||
1359 | GPIO_OUT |= 0x00080000; | 1371 | GPIO_OUT |= 0x00080000; |
1360 | GPIO_ENABLE |= 0x00080000; | 1372 | GPIO_ENABLE |= 0x00080000; |
1361 | GPIO_FUNCTION |= 0x00080000; | 1373 | GPIO_FUNCTION |= 0x00080000; |