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