summaryrefslogtreecommitdiff
path: root/firmware/target/sh/archos
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/target/sh/archos')
-rw-r--r--firmware/target/sh/archos/fm_v2/power-fm_v2.c4
-rw-r--r--firmware/target/sh/archos/player/power-player.c4
-rw-r--r--firmware/target/sh/archos/recorder/power-recorder.c4
3 files changed, 0 insertions, 12 deletions
diff --git a/firmware/target/sh/archos/fm_v2/power-fm_v2.c b/firmware/target/sh/archos/fm_v2/power-fm_v2.c
index 24bccf6eb2..ce1ef19970 100644
--- a/firmware/target/sh/archos/fm_v2/power-fm_v2.c
+++ b/firmware/target/sh/archos/fm_v2/power-fm_v2.c
@@ -100,14 +100,10 @@ void ide_power_enable(bool on)
100 100
101bool ide_powered(void) 101bool ide_powered(void)
102{ 102{
103#ifdef HAVE_ATA_POWER_OFF
104 if ((PACR2 & 0x0400) || !(PAIORL & 0x20)) /* not configured for output */ 103 if ((PACR2 & 0x0400) || !(PAIORL & 0x20)) /* not configured for output */
105 return true; /* would be floating high, disk on */ 104 return true; /* would be floating high, disk on */
106 else 105 else
107 return (PADRL & 0x20) != 0; 106 return (PADRL & 0x20) != 0;
108#else /* !defined(NEEDS_ATA_POWER_ON) && !defined(HAVE_ATA_POWER_OFF) */
109 return true; /* pretend always powered if not controlable */
110#endif
111} 107}
112 108
113void power_off(void) 109void power_off(void)
diff --git a/firmware/target/sh/archos/player/power-player.c b/firmware/target/sh/archos/player/power-player.c
index 7031e45d6a..33f5959021 100644
--- a/firmware/target/sh/archos/player/power-player.c
+++ b/firmware/target/sh/archos/player/power-player.c
@@ -66,7 +66,6 @@ void ide_power_enable(bool on)
66 66
67bool ide_powered(void) 67bool ide_powered(void)
68{ 68{
69#ifdef HAVE_ATA_POWER_OFF
70 /* This is not correct for very old players, since these are unable to 69 /* This is not correct for very old players, since these are unable to
71 * control hd power. However, driving the pin doesn't hurt, because it 70 * control hd power. However, driving the pin doesn't hurt, because it
72 * is not connected anywhere */ 71 * is not connected anywhere */
@@ -74,9 +73,6 @@ bool ide_powered(void)
74 return false; /* would be floating low, disk off */ 73 return false; /* would be floating low, disk off */
75 else 74 else
76 return (PBDRL & 0x10) != 0; 75 return (PBDRL & 0x10) != 0;
77#else /* !defined(NEEDS_ATA_POWER_ON) && !defined(HAVE_ATA_POWER_OFF) */
78 return true; /* pretend always powered if not controlable */
79#endif
80} 76}
81 77
82void power_off(void) 78void power_off(void)
diff --git a/firmware/target/sh/archos/recorder/power-recorder.c b/firmware/target/sh/archos/recorder/power-recorder.c
index 8d7ea5fc51..48cfdc1e17 100644
--- a/firmware/target/sh/archos/recorder/power-recorder.c
+++ b/firmware/target/sh/archos/recorder/power-recorder.c
@@ -92,14 +92,10 @@ void ide_power_enable(bool on)
92 92
93bool ide_powered(void) 93bool ide_powered(void)
94{ 94{
95#ifdef HAVE_ATA_POWER_OFF
96 if ((PACR2 & 0x0400) || !(PAIORL & 0x20)) /* not configured for output */ 95 if ((PACR2 & 0x0400) || !(PAIORL & 0x20)) /* not configured for output */
97 return true; /* would be floating high, disk on */ 96 return true; /* would be floating high, disk on */
98 else 97 else
99 return (PADRL & 0x20) != 0; 98 return (PADRL & 0x20) != 0;
100#else /* !defined(NEEDS_ATA_POWER_ON) && !defined(HAVE_ATA_POWER_OFF) */
101 return true; /* pretend always powered if not controlable */
102#endif
103} 99}
104 100
105void power_off(void) 101void power_off(void)