Subversion Repositories freemyipod

Rev

Rev 643 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 643 Rev 646
Line 975... Line 975...
975
    ata_sleep_timeout = seconds * 1000000;
975
    ata_sleep_timeout = seconds * 1000000;
976
}
976
}
977
 
977
 
978
void ata_sleep(void)
978
void ata_sleep(void)
979
{
979
{
980
    mutex_lock(&ata_mutex, TIMEOUT_BLOCK);
980
    ata_last_activity_value = USEC_TIMER - ata_sleep_timeout + 200000;
981
    ata_power_down();
-
 
982
    mutex_unlock(&ata_mutex);
-
 
983
}
981
}
984
 
982
 
985
void ata_sleepnow(void)
983
void ata_sleepnow(void)
986
{
984
{
-
 
985
    mutex_lock(&ata_mutex, TIMEOUT_BLOCK);
987
    ata_sleep();
986
    ata_power_down();
-
 
987
    mutex_unlock(&ata_mutex);
988
}
988
}
989
 
989
 
990
void ata_close(void)
990
void ata_close(void)
991
{
991
{
992
    ata_sleep();
992
    ata_sleepnow();
993
}
993
}
994
 
994
 
995
void ata_spin(void)
995
void ata_spin(void)
996
{
996
{
997
    ata_power_up();
997
    ata_set_active();
998
}
998
}
999
 
999
 
1000
void ata_get_info(IF_MD2(int drive,) struct storage_info *info)
1000
void ata_get_info(IF_MD2(int drive,) struct storage_info *info)
1001
{
1001
{
1002
    (*info).sector_size = SECTOR_SIZE;
1002
    (*info).sector_size = SECTOR_SIZE;