diff options
author | Björn Stenberg <bjorn@haxx.se> | 2002-12-04 14:58:48 +0000 |
---|---|---|
committer | Björn Stenberg <bjorn@haxx.se> | 2002-12-04 14:58:48 +0000 |
commit | b070dd55be61b19a0cf88cd8d8a5b80387c50f31 (patch) | |
tree | bda0516c85e38bfc687fdc74ba97eea016e46b58 /firmware/drivers/ata.c | |
parent | d41942e12f6a63b1067e9d3b91e55a02ad78b2b6 (diff) |
Added disk spinup clocking
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@2927 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/drivers/ata.c')
-rw-r--r-- | firmware/drivers/ata.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/firmware/drivers/ata.c b/firmware/drivers/ata.c index 0b7a37e5ec..8f70714e4c 100644 --- a/firmware/drivers/ata.c +++ b/firmware/drivers/ata.c @@ -80,6 +80,7 @@ int ata_io_address; /* 0x300 or 0x200, only valid on recorder */ static volatile unsigned char* ata_control; bool old_recorder = false; +int ata_spinup_time = 0; static bool sleeping = false; static int sleep_timeout = 5*HZ; static bool poweroff = false; @@ -186,6 +187,7 @@ int ata_read_sectors(unsigned long start, } sleeping = false; poweroff = false; + ata_spinup_time = current_tick - last_disk_activity; } ATA_SELECT = ata_device; @@ -307,6 +309,7 @@ int ata_write_sectors(unsigned long start, } sleeping = false; poweroff = false; + ata_spinup_time = current_tick - last_disk_activity; } ATA_SELECT = ata_device; |