Implement udelay() for S5L870x. Exchange sleep() with udelay() during CPU voltage scaling. Voltage scaling was measured stable with 50us delay, to have some headroom we use 100us.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28606 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Andree Buschmann 2010-11-15 21:13:58 +00:00
parent d1302940b9
commit e464656b88
2 changed files with 8 additions and 1 deletions

View file

@ -38,4 +38,10 @@
#define inw(a) (*(volatile unsigned short *) (a))
#define outw(a,b) (*(volatile unsigned short *) (b) = (a))
static inline void udelay(unsigned usecs)
{
unsigned stop = USEC_TIMER + usecs;
while (TIME_BEFORE(USEC_TIMER, stop));
}
#endif /* SYSTEM_TARGET_H */