diff --git a/apps/plugin.h b/apps/plugin.h index 2fac5ee7e4..d19c696d2b 100644 --- a/apps/plugin.h +++ b/apps/plugin.h @@ -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 */ diff --git a/firmware/drivers/ata.c b/firmware/drivers/ata.c index 6ec414c5b8..8ee8225d1b 100644 --- a/firmware/drivers/ata.c +++ b/firmware/drivers/ata.c @@ -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) diff --git a/firmware/drivers/ata_mmc.c b/firmware/drivers/ata_mmc.c index 2e5bd3d78f..f398846387 100644 --- a/firmware/drivers/ata_mmc.c +++ b/firmware/drivers/ata_mmc.c @@ -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) diff --git a/firmware/export/ata.h b/firmware/export/ata.h index e9dc54c6fe..83124c6bfa 100644 --- a/firmware/export/ata.h +++ b/firmware/export/ata.h @@ -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);