Fix "lcd driver speed up" on e200v2

Flyspray: FS#10272
Author: Michael Chicoine

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22859 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Rafaël Carré 2009-09-30 18:54:42 +00:00
parent 619ffcb0e6
commit 6bd92a74d3

View file

@ -98,12 +98,11 @@ static unsigned short r_entry_mode = R_ENTRY_MODE_HORZ_NORMAL;
#define R_DISP_CONTROL_REV 0x0000 #define R_DISP_CONTROL_REV 0x0000
static unsigned short r_disp_control_rev = R_DISP_CONTROL_NORMAL; static unsigned short r_disp_control_rev = R_DISP_CONTROL_NORMAL;
/* TODO: Implement this function */ static inline void lcd_delay(int x)
static void lcd_delay(int x)
{ {
/* This is just arbitrary - the OF does something more complex */ do {
x *= 1024; asm volatile ("nop\n");
while (x--); } while (x--);
} }
/* DBOP initialisation, do what OF does */ /* DBOP initialisation, do what OF does */
@ -130,10 +129,13 @@ static void ams3525_dbop_init(void)
/* TODO: The OF calls some other functions here, but maybe not important */ /* TODO: The OF calls some other functions here, but maybe not important */
} }
#define lcd_write_single_data16(value) do {\ static void lcd_write_single_data16(unsigned short value)
DBOP_CTRL &= ~(1<<14|1<<13); \ {
DBOP_DOUT16 = (fb_data)(value); \ DBOP_CTRL &= ~(1<<14|1<<13);
} while(0) lcd_delay(10);
DBOP_DOUT16 = value;
while ((DBOP_STAT & (1<<10)) == 0);
}
static void lcd_write_cmd(int cmd) static void lcd_write_cmd(int cmd)
{ {