summaryrefslogtreecommitdiff
path: root/firmware/target/arm/sandisk/sansa-e200
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/target/arm/sandisk/sansa-e200')
-rw-r--r--firmware/target/arm/sandisk/sansa-e200/lcd-e200.c14
1 files changed, 2 insertions, 12 deletions
diff --git a/firmware/target/arm/sandisk/sansa-e200/lcd-e200.c b/firmware/target/arm/sandisk/sansa-e200/lcd-e200.c
index 3e8246b367..93d79633b1 100644
--- a/firmware/target/arm/sandisk/sansa-e200/lcd-e200.c
+++ b/firmware/target/arm/sandisk/sansa-e200/lcd-e200.c
@@ -112,16 +112,6 @@ static inline void lcd_write_reg(unsigned int reg, unsigned int data)
112 lcd_send_msg(0x72, data); 112 lcd_send_msg(0x72, data);
113} 113}
114 114
115static inline void cache_flush(void)
116{
117#ifndef BOOTLOADER
118 outl(inl(0xf000f044) | 0x2, 0xf000f044);
119 while ((CACHE_CTL & 0x8000) != 0)
120 {
121 }
122#endif
123}
124
125/* The LCD controller gets passed the address of the framebuffer, but can only 115/* The LCD controller gets passed the address of the framebuffer, but can only
126 use the physical, not the remapped, address. This is a quick and dirty way 116 use the physical, not the remapped, address. This is a quick and dirty way
127 of correcting it */ 117 of correcting it */
@@ -271,7 +261,7 @@ inline void lcd_update_rect(int x, int y, int width, int height)
271 memcpy(((char*)&lcd_driver_framebuffer)+(y * sizeof(fb_data) * LCD_WIDTH), 261 memcpy(((char*)&lcd_driver_framebuffer)+(y * sizeof(fb_data) * LCD_WIDTH),
272 ((char *)&lcd_framebuffer)+(y * sizeof(fb_data) * LCD_WIDTH), 262 ((char *)&lcd_framebuffer)+(y * sizeof(fb_data) * LCD_WIDTH),
273 ((height * sizeof(fb_data) * LCD_WIDTH))); 263 ((height * sizeof(fb_data) * LCD_WIDTH)));
274 cache_flush(); 264 flush_icache();
275 265
276 /* Restart DMA */ 266 /* Restart DMA */
277 LCD_REG_6 |= 1; 267 LCD_REG_6 |= 1;
@@ -287,7 +277,7 @@ inline void lcd_update(void)
287 277
288 /* Copy the Rockbox framebuffer to the second framebuffer */ 278 /* Copy the Rockbox framebuffer to the second framebuffer */
289 memcpy(lcd_driver_framebuffer, lcd_framebuffer, sizeof(fb_data) * LCD_WIDTH * LCD_HEIGHT); 279 memcpy(lcd_driver_framebuffer, lcd_framebuffer, sizeof(fb_data) * LCD_WIDTH * LCD_HEIGHT);
290 cache_flush(); 280 flush_icache();
291 281
292 /* Restart DMA */ 282 /* Restart DMA */
293 LCD_REG_6 |= 1; 283 LCD_REG_6 |= 1;