mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-10-13 18:17:39 -04:00
Added disk spinup clocking
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@2927 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
d41942e12f
commit
b070dd55be
3 changed files with 12 additions and 1 deletions
|
@ -1107,7 +1107,7 @@ static bool dbg_disk_info(void)
|
||||||
bool done = false;
|
bool done = false;
|
||||||
int i;
|
int i;
|
||||||
int page = 0;
|
int page = 0;
|
||||||
const int max_page = 2;
|
const int max_page = 3;
|
||||||
unsigned short* identify_info = ata_get_identify();
|
unsigned short* identify_info = ata_get_identify();
|
||||||
|
|
||||||
while(!done)
|
while(!done)
|
||||||
|
@ -1146,6 +1146,13 @@ static bool dbg_disk_info(void)
|
||||||
(unsigned)identify_info[60]) / 2048 );
|
(unsigned)identify_info[60]) / 2048 );
|
||||||
lcd_puts(0, y++, "Size");
|
lcd_puts(0, y++, "Size");
|
||||||
lcd_puts(0, y++, buf);
|
lcd_puts(0, y++, buf);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 3:
|
||||||
|
snprintf(buf, sizeof buf, "%d ms", ata_spinup_time * (1000/HZ));
|
||||||
|
lcd_puts(0, y++, "Spinup time");
|
||||||
|
lcd_puts(0, y++, buf);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
lcd_update();
|
lcd_update();
|
||||||
|
|
||||||
|
|
|
@ -80,6 +80,7 @@ int ata_io_address; /* 0x300 or 0x200, only valid on recorder */
|
||||||
static volatile unsigned char* ata_control;
|
static volatile unsigned char* ata_control;
|
||||||
|
|
||||||
bool old_recorder = false;
|
bool old_recorder = false;
|
||||||
|
int ata_spinup_time = 0;
|
||||||
static bool sleeping = false;
|
static bool sleeping = false;
|
||||||
static int sleep_timeout = 5*HZ;
|
static int sleep_timeout = 5*HZ;
|
||||||
static bool poweroff = false;
|
static bool poweroff = false;
|
||||||
|
@ -186,6 +187,7 @@ int ata_read_sectors(unsigned long start,
|
||||||
}
|
}
|
||||||
sleeping = false;
|
sleeping = false;
|
||||||
poweroff = false;
|
poweroff = false;
|
||||||
|
ata_spinup_time = current_tick - last_disk_activity;
|
||||||
}
|
}
|
||||||
|
|
||||||
ATA_SELECT = ata_device;
|
ATA_SELECT = ata_device;
|
||||||
|
@ -307,6 +309,7 @@ int ata_write_sectors(unsigned long start,
|
||||||
}
|
}
|
||||||
sleeping = false;
|
sleeping = false;
|
||||||
poweroff = false;
|
poweroff = false;
|
||||||
|
ata_spinup_time = current_tick - last_disk_activity;
|
||||||
}
|
}
|
||||||
|
|
||||||
ATA_SELECT = ata_device;
|
ATA_SELECT = ata_device;
|
||||||
|
|
|
@ -48,5 +48,6 @@ extern void ata_spin(void);
|
||||||
extern unsigned short* ata_get_identify(void);
|
extern unsigned short* ata_get_identify(void);
|
||||||
|
|
||||||
extern long last_disk_activity;
|
extern long last_disk_activity;
|
||||||
|
extern int ata_spinup_time; /* ticks */
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue