diff options
author | Michael Sevakis <jethead71@rockbox.org> | 2007-04-13 20:55:48 +0000 |
---|---|---|
committer | Michael Sevakis <jethead71@rockbox.org> | 2007-04-13 20:55:48 +0000 |
commit | d95c39072ace1a7aeaad3ee49ed668399b4862bd (patch) | |
tree | 7f8c8e41e5e793daa64051f153bbbd52ccbe8fc9 /firmware/target/arm/sandisk/sansa-e200 | |
parent | e10f455fbd3149a034e35d30be333f958d773d92 (diff) | |
download | rockbox-d95c39072ace1a7aeaad3ee49ed668399b4862bd.tar.gz rockbox-d95c39072ace1a7aeaad3ee49ed668399b4862bd.zip |
Portal Player: Add invalidate_icache and flush_icache. Flush the cache on the core for newborn threads. In doing so, move more ARM stuff to the target tree and organize it to make a clean job of it. If anything isn't appropriate for some particular device give a hollar or even just fix it by some added #ifdefing. I was informed that the PP targets are register compatible so I'm going off that advice. The Sansa likes it though.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13144 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/target/arm/sandisk/sansa-e200')
-rw-r--r-- | firmware/target/arm/sandisk/sansa-e200/lcd-e200.c | 14 |
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 | ||
115 | static 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; |