summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--firmware/drivers/ata.c5
-rw-r--r--firmware/drivers/power.c4
2 files changed, 8 insertions, 1 deletions
diff --git a/firmware/drivers/ata.c b/firmware/drivers/ata.c
index b4151d0..46c2bc8 100644
--- a/firmware/drivers/ata.c
+++ b/firmware/drivers/ata.c
@@ -801,6 +801,11 @@ int ata_init(void)
led(false);
+ /* Port A setup */
+ PAIOR |= 0x0200; /* output for ATA reset */
+ PADR |= 0x0200; /* release ATA reset */
+ PACR2 &= 0xBFFF; /* GPIO function for PA7 (IDE enable) */
+
ata_enable(true);
if ( !initialized ) {
diff --git a/firmware/drivers/power.c b/firmware/drivers/power.c
index b10cefe..5121a4c 100644
--- a/firmware/drivers/power.c
+++ b/firmware/drivers/power.c
@@ -63,7 +63,9 @@ void charger_enable(bool on)
void ide_power_enable(bool on)
{
#ifdef HAVE_ATA_POWER_OFF
- if(on)
+ PAIOR |= 0x20; /* there's no power driver init, so I have to do that here */
+
+ if(on)
PADR |= 0x20;
else
PADR &= ~0x20;