summaryrefslogtreecommitdiff
path: root/firmware/drivers/power.c
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/drivers/power.c')
-rw-r--r--firmware/drivers/power.c14
1 files changed, 0 insertions, 14 deletions
diff --git a/firmware/drivers/power.c b/firmware/drivers/power.c
index 2a87cad2e1..eb69fcec27 100644
--- a/firmware/drivers/power.c
+++ b/firmware/drivers/power.c
@@ -91,8 +91,6 @@ bool charger_inserted(void)
91#elif defined (HAVE_FMADC) 91#elif defined (HAVE_FMADC)
92 /* FM or V2, can also charge from the USB port */ 92 /* FM or V2, can also charge from the USB port */
93 return (adc_read(ADC_CHARGE_REGULATOR) < 0x1FF); 93 return (adc_read(ADC_CHARGE_REGULATOR) < 0x1FF);
94#elif defined(TOSHIBA_GIGABEAT_F)
95 return false;
96#else 94#else
97 /* Player */ 95 /* Player */
98 return (PADR & 1) == 0; 96 return (PADR & 1) == 0;
@@ -136,9 +134,6 @@ void ide_power_enable(bool on)
136{ 134{
137 (void)on; 135 (void)on;
138 136
139#if defined(TOSHIBA_GIGABEAT_F)
140 /* Gigabeat TODO */
141#else /* SH1 based archos */
142 bool touched = false; 137 bool touched = false;
143#ifdef NEEDS_ATA_POWER_ON 138#ifdef NEEDS_ATA_POWER_ON
144 if(on) 139 if(on)
@@ -175,15 +170,11 @@ void ide_power_enable(bool on)
175 PACR2 &= 0xFBFF; /* GPIO for PA5 */ 170 PACR2 &= 0xFBFF; /* GPIO for PA5 */
176#endif 171#endif
177 } 172 }
178#endif /* SH1 based archos */
179} 173}
180 174
181 175
182bool ide_powered(void) 176bool ide_powered(void)
183{ 177{
184#if defined(TOSHIBA_GIGABEAT_F)
185 return false;
186#else /* SH1 based archos */
187#if defined(NEEDS_ATA_POWER_ON) || defined(HAVE_ATA_POWER_OFF) 178#if defined(NEEDS_ATA_POWER_ON) || defined(HAVE_ATA_POWER_OFF)
188#ifdef ATA_POWER_PLAYERSTYLE 179#ifdef ATA_POWER_PLAYERSTYLE
189 /* This is not correct for very old players, since these are unable to 180 /* This is not correct for very old players, since these are unable to
@@ -202,7 +193,6 @@ bool ide_powered(void)
202#else /* !defined(NEEDS_ATA_POWER_ON) && !defined(HAVE_ATA_POWER_OFF) */ 193#else /* !defined(NEEDS_ATA_POWER_ON) && !defined(HAVE_ATA_POWER_OFF) */
203 return true; /* pretend always powered if not controlable */ 194 return true; /* pretend always powered if not controlable */
204#endif 195#endif
205#endif
206} 196}
207#endif /* !HAVE_MMC */ 197#endif /* !HAVE_MMC */
208 198
@@ -210,9 +200,6 @@ bool ide_powered(void)
210void power_off(void) 200void power_off(void)
211{ 201{
212 set_irq_level(HIGHEST_IRQ_LEVEL); 202 set_irq_level(HIGHEST_IRQ_LEVEL);
213#if defined(TOSHIBA_GIGABEAT_F)
214 /* FIXME: Can we turn the device off, or only enter sleep mode? */
215#else
216#ifdef HAVE_POWEROFF_ON_PBDR 203#ifdef HAVE_POWEROFF_ON_PBDR
217 and_b(~0x10, &PBDRL); 204 and_b(~0x10, &PBDRL);
218 or_b(0x10, &PBIORL); 205 or_b(0x10, &PBIORL);
@@ -226,7 +213,6 @@ void power_off(void)
226 and_b(~0x08, &PADRH); 213 and_b(~0x08, &PADRH);
227 or_b(0x08, &PAIORH); 214 or_b(0x08, &PAIORH);
228#endif 215#endif
229#endif
230 while(1) 216 while(1)
231 yield(); 217 yield();
232} 218}