1
0
Fork 0
forked from len0rd/rockbox

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

@ -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)