1
0
Fork 0
forked from len0rd/rockbox

Fix an almost 3 years old bug introduced when moving the archos power handling to target tree: ide_powered() must always use the full implementation, even if HAVE_ATA_POWER_OFF isn't defined. This led to an ATA panic in the Player's charging screen for SVN builds (only applies to flashed Players).

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25593 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Jens Arnold 2010-04-11 16:23:27 +00:00
parent 07ec3c9d69
commit f54ce55bce
3 changed files with 0 additions and 12 deletions

View file

@ -100,14 +100,10 @@ void ide_power_enable(bool on)
bool ide_powered(void) bool ide_powered(void)
{ {
#ifdef HAVE_ATA_POWER_OFF
if ((PACR2 & 0x0400) || !(PAIORL & 0x20)) /* not configured for output */ if ((PACR2 & 0x0400) || !(PAIORL & 0x20)) /* not configured for output */
return true; /* would be floating high, disk on */ return true; /* would be floating high, disk on */
else else
return (PADRL & 0x20) != 0; return (PADRL & 0x20) != 0;
#else /* !defined(NEEDS_ATA_POWER_ON) && !defined(HAVE_ATA_POWER_OFF) */
return true; /* pretend always powered if not controlable */
#endif
} }
void power_off(void) void power_off(void)

View file

@ -66,7 +66,6 @@ void ide_power_enable(bool on)
bool ide_powered(void) bool ide_powered(void)
{ {
#ifdef HAVE_ATA_POWER_OFF
/* This is not correct for very old players, since these are unable to /* This is not correct for very old players, since these are unable to
* control hd power. However, driving the pin doesn't hurt, because it * control hd power. However, driving the pin doesn't hurt, because it
* is not connected anywhere */ * is not connected anywhere */
@ -74,9 +73,6 @@ bool ide_powered(void)
return false; /* would be floating low, disk off */ return false; /* would be floating low, disk off */
else else
return (PBDRL & 0x10) != 0; return (PBDRL & 0x10) != 0;
#else /* !defined(NEEDS_ATA_POWER_ON) && !defined(HAVE_ATA_POWER_OFF) */
return true; /* pretend always powered if not controlable */
#endif
} }
void power_off(void) void power_off(void)

View file

@ -92,14 +92,10 @@ void ide_power_enable(bool on)
bool ide_powered(void) bool ide_powered(void)
{ {
#ifdef HAVE_ATA_POWER_OFF
if ((PACR2 & 0x0400) || !(PAIORL & 0x20)) /* not configured for output */ if ((PACR2 & 0x0400) || !(PAIORL & 0x20)) /* not configured for output */
return true; /* would be floating high, disk on */ return true; /* would be floating high, disk on */
else else
return (PADRL & 0x20) != 0; return (PADRL & 0x20) != 0;
#else /* !defined(NEEDS_ATA_POWER_ON) && !defined(HAVE_ATA_POWER_OFF) */
return true; /* pretend always powered if not controlable */
#endif
} }
void power_off(void) void power_off(void)