Added disk spinup clocking

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@2927 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Björn Stenberg 2002-12-04 14:58:48 +00:00
parent d41942e12f
commit b070dd55be
3 changed files with 12 additions and 1 deletions

View file

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

View file

@ -48,5 +48,6 @@ extern void ata_spin(void);
extern unsigned short* ata_get_identify(void);
extern long last_disk_activity;
extern int ata_spinup_time; /* ticks */
#endif