diff options
-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; |