D2: Fix another timing loop that broke when we switched to the EABI compiler, this time in the LCD driver.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27395 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Rob Purchase 2010-07-11 22:21:33 +00:00
parent c9a4fb0d0d
commit 8a07e78a06

View file

@ -77,9 +77,12 @@ void lcd_set_contrast(int val)
/* Delay loop based on CPU frequency (FREQ>>23 is 3..22 for 32MHz..192MHz) */
static void delay_loop(void)
{
unsigned long x;
for (x = (unsigned)(FREQ>>23); x; x--);
asm volatile (" mov %[freq], %[freq], asr#23 \n\t"
"1: subs %[freq], %[freq], #1 \n\t"
" bne 1b"
: : [freq] "r" (cpu_frequency) : "memory");
}
#define DELAY delay_loop()
static void ltv250qv_write(unsigned int command)