diff options
author | Rafaël Carré <rafael.carre@gmail.com> | 2009-09-30 18:54:42 +0000 |
---|---|---|
committer | Rafaël Carré <rafael.carre@gmail.com> | 2009-09-30 18:54:42 +0000 |
commit | 6bd92a74d358632155bd7cb05ee3ae44973bbc49 (patch) | |
tree | 5bddacac01751f9779ea8df0cbd37cc9beaed137 | |
parent | 619ffcb0e60a21aaed3500f0ef0cd606c47225f1 (diff) | |
download | rockbox-6bd92a74d358632155bd7cb05ee3ae44973bbc49.tar.gz rockbox-6bd92a74d358632155bd7cb05ee3ae44973bbc49.zip |
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
-rw-r--r-- | firmware/target/arm/as3525/sansa-e200v2/lcd-e200v2.c | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/firmware/target/arm/as3525/sansa-e200v2/lcd-e200v2.c b/firmware/target/arm/as3525/sansa-e200v2/lcd-e200v2.c index 35f06eae12..a063ae4db8 100644 --- a/firmware/target/arm/as3525/sansa-e200v2/lcd-e200v2.c +++ b/firmware/target/arm/as3525/sansa-e200v2/lcd-e200v2.c | |||
@@ -98,12 +98,11 @@ static unsigned short r_entry_mode = R_ENTRY_MODE_HORZ_NORMAL; | |||
98 | #define R_DISP_CONTROL_REV 0x0000 | 98 | #define R_DISP_CONTROL_REV 0x0000 |
99 | static unsigned short r_disp_control_rev = R_DISP_CONTROL_NORMAL; | 99 | static unsigned short r_disp_control_rev = R_DISP_CONTROL_NORMAL; |
100 | 100 | ||
101 | /* TODO: Implement this function */ | 101 | static inline void lcd_delay(int x) |
102 | static void lcd_delay(int x) | ||
103 | { | 102 | { |
104 | /* This is just arbitrary - the OF does something more complex */ | 103 | do { |
105 | x *= 1024; | 104 | asm volatile ("nop\n"); |
106 | while (x--); | 105 | } while (x--); |
107 | } | 106 | } |
108 | 107 | ||
109 | /* DBOP initialisation, do what OF does */ | 108 | /* DBOP initialisation, do what OF does */ |
@@ -130,10 +129,13 @@ static void ams3525_dbop_init(void) | |||
130 | /* TODO: The OF calls some other functions here, but maybe not important */ | 129 | /* TODO: The OF calls some other functions here, but maybe not important */ |
131 | } | 130 | } |
132 | 131 | ||
133 | #define lcd_write_single_data16(value) do {\ | 132 | static void lcd_write_single_data16(unsigned short value) |
134 | DBOP_CTRL &= ~(1<<14|1<<13); \ | 133 | { |
135 | DBOP_DOUT16 = (fb_data)(value); \ | 134 | DBOP_CTRL &= ~(1<<14|1<<13); |
136 | } while(0) | 135 | lcd_delay(10); |
136 | DBOP_DOUT16 = value; | ||
137 | while ((DBOP_STAT & (1<<10)) == 0); | ||
138 | } | ||
137 | 139 | ||
138 | static void lcd_write_cmd(int cmd) | 140 | static void lcd_write_cmd(int cmd) |
139 | { | 141 | { |