summaryrefslogtreecommitdiff
path: root/firmware
diff options
context:
space:
mode:
Diffstat (limited to 'firmware')
-rw-r--r--firmware/drivers/ata.c9
-rw-r--r--firmware/drivers/ata.h1
2 files changed, 8 insertions, 2 deletions
diff --git a/firmware/drivers/ata.c b/firmware/drivers/ata.c
index 18f50b24df..e80d53c3d0 100644
--- a/firmware/drivers/ata.c
+++ b/firmware/drivers/ata.c
@@ -174,7 +174,7 @@ int ata_read_sectors(unsigned long start,
return ret;
}
-#ifdef DISK_WRITE
+//#ifdef DISK_WRITE
int ata_write_sectors(unsigned long start,
unsigned char count,
void* buf)
@@ -230,7 +230,7 @@ int ata_write_sectors(unsigned long start,
mutex_unlock(&ata_mtx);
return i;
}
-#endif
+//#endif
static int check_registers(void)
{
@@ -269,6 +269,11 @@ void ata_spindown(int seconds)
sleep_timeout = seconds * HZ;
}
+bool ata_disk_is_active(void)
+{
+ return !sleeping;
+}
+
static int ata_perform_sleep(void)
{
int ret = 0;
diff --git a/firmware/drivers/ata.h b/firmware/drivers/ata.h
index 77c4c2b7bf..aa9c767cbb 100644
--- a/firmware/drivers/ata.h
+++ b/firmware/drivers/ata.h
@@ -35,6 +35,7 @@
extern void ata_enable(bool on);
extern void ata_spindown(int seconds);
extern int ata_sleep(void);
+extern bool ata_disk_is_active(void);
extern int ata_hard_reset(void);
extern int ata_soft_reset(void);
extern int ata_init(void);