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

@ -31,12 +31,17 @@
/* Overdrive mode */
#define CPUFREQ_MAX 528000000
static inline void udelay(unsigned int usecs)
static inline void udelay(unsigned long usecs)
{
unsigned stop = GPTCNT + usecs;
unsigned long stop = GPTCNT + usecs;
while (TIME_BEFORE(GPTCNT, stop));
}
static inline unsigned long usec_timer(void)
{
return GPTCNT;
}
void watchdog_init(unsigned int half_seconds);
void watchdog_service(void);