From d95c39072ace1a7aeaad3ee49ed668399b4862bd Mon Sep 17 00:00:00 2001 From: Michael Sevakis Date: Fri, 13 Apr 2007 20:55:48 +0000 Subject: 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 --- firmware/target/arm/sandisk/sansa-e200/lcd-e200.c | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) (limited to 'firmware/target/arm/sandisk/sansa-e200') 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) lcd_send_msg(0x72, data); } -static inline void cache_flush(void) -{ -#ifndef BOOTLOADER - outl(inl(0xf000f044) | 0x2, 0xf000f044); - while ((CACHE_CTL & 0x8000) != 0) - { - } -#endif -} - /* The LCD controller gets passed the address of the framebuffer, but can only use the physical, not the remapped, address. This is a quick and dirty way of correcting it */ @@ -271,7 +261,7 @@ inline void lcd_update_rect(int x, int y, int width, int height) memcpy(((char*)&lcd_driver_framebuffer)+(y * sizeof(fb_data) * LCD_WIDTH), ((char *)&lcd_framebuffer)+(y * sizeof(fb_data) * LCD_WIDTH), ((height * sizeof(fb_data) * LCD_WIDTH))); - cache_flush(); + flush_icache(); /* Restart DMA */ LCD_REG_6 |= 1; @@ -287,7 +277,7 @@ inline void lcd_update(void) /* Copy the Rockbox framebuffer to the second framebuffer */ memcpy(lcd_driver_framebuffer, lcd_framebuffer, sizeof(fb_data) * LCD_WIDTH * LCD_HEIGHT); - cache_flush(); + flush_icache(); /* Restart DMA */ LCD_REG_6 |= 1; -- cgit v1.2.3