Removed unused ata_standby(), changed return type of ata_sleep() to void, removed misleading comment from ata.h

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7782 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Jens Arnold 2005-11-07 23:19:06 +00:00
parent 77372d1218
commit a8c1c20305
4 changed files with 4 additions and 57 deletions

View file

@ -271,7 +271,7 @@ struct plugin_api {
int (*read_line)(int fd, char* buffer, int buffer_size);
bool (*settings_parseline)(char* line, char** name, char** value);
#ifndef SIMULATOR
int (*ata_sleep)(void);
void (*ata_sleep)(void);
#endif
/* dir */

View file

@ -1015,42 +1015,9 @@ static int ata_perform_sleep(void)
return ret;
}
int ata_standby(int time)
{
int ret = 0;
mutex_lock(&ata_mtx);
SET_REG(ATA_SELECT, ata_device);
if(!wait_for_rdy()) {
DEBUGF("ata_standby() - not RDY\n");
mutex_unlock(&ata_mtx);
return -1;
}
if(time)
/* Round up to nearest 5 secs */
SET_REG(ATA_NSECTOR, ((time + 5) / 5) & 0xff);
else
SET_REG(ATA_NSECTOR, 0); /* Disable standby */
SET_REG(ATA_COMMAND, CMD_STANDBY);
if (!wait_for_rdy())
{
DEBUGF("ata_standby() - CMD failed\n");
ret = -2;
}
mutex_unlock(&ata_mtx);
return ret;
}
int ata_sleep(void)
void ata_sleep(void)
{
queue_post(&ata_queue, Q_SLEEP, NULL);
return 0;
}
void ata_spin(void)

View file

@ -998,16 +998,8 @@ bool ata_disk_is_active(void)
return mmc_mutex.locked;
}
int ata_standby(int time)
void ata_sleep(void)
{
(void)time;
return 0;
}
int ata_sleep(void)
{
return 0;
}
void ata_spin(void)

View file

@ -36,22 +36,10 @@
#define NUM_VOLUMES 1
#endif
/*
ata_spindown() time values:
-1 Immediate spindown
0 Timeout disabled
1-240 (time * 5) seconds
241-251((time - 240) * 30) minutes
252 21 minutes
253 Period between 8 and 12 hrs
254 Reserved
255 21 min 15 s
*/
extern void ata_enable(bool on);
extern void ata_spindown(int seconds);
extern void ata_poweroff(bool enable);
extern int ata_sleep(void);
extern int ata_standby(int time);
extern void ata_sleep(void);
extern bool ata_disk_is_active(void);
extern int ata_hard_reset(void);
extern int ata_soft_reset(void);