1
0
Fork 0
forked from len0rd/rockbox

i.MX31: Busy wait for a couple microseconds at most then sleep until next tick when polling drive status. This prevents pointless jumps to overdrive speed from perceived high load when waiting for lengthy ops to complete such as spinup and sleep.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29108 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Michael Sevakis 2011-01-22 09:23:31 +00:00
parent 5729be4017
commit 060609a202
5 changed files with 57 additions and 4 deletions

View file

@ -201,6 +201,7 @@ static int perform_soft_reset(void);
static int set_multiple_mode(int sectors);
static int set_features(void);
#ifndef ATA_TARGET_POLLING
STATICIRAM ICODE_ATTR int wait_for_bsy(void)
{
long timeout = current_tick + HZ*30;
@ -235,6 +236,12 @@ STATICIRAM ICODE_ATTR int wait_for_rdy(void)
return 0; /* timeout */
}
#else
extern int ata_wait_for_bsy(void);
extern int ata_wait_for_rdy(void);
#define wait_for_bsy ata_wait_for_bsy
#define wait_for_rdy ata_wait_for_rdy
#endif
STATICIRAM ICODE_ATTR int wait_for_start_of_transfer(void)
{