summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Ryabinin <ryabinin.a.a@gmail.com>2012-10-25 13:50:42 +0400
committerAndrew Ryabinin <ryabinin.a.a@gmail.com>2012-10-25 14:48:21 +0400
commitc1ec1ec89962ded5ae4acefc33c6a445f5b4c3f5 (patch)
treeebf6e26d67b29758a1dc5a4d0e0e2d03430db144
parent50d9fb95ebeeb3f9c9802ebe3e35a43d1a7273d4 (diff)
downloadrockbox-c1ec1ec89962ded5ae4acefc33c6a445f5b4c3f5.zip
rockbox-c1ec1ec89962ded5ae4acefc33c6a445f5b4c3f5.tar.gz
rockbox-c1ec1ec89962ded5ae4acefc33c6a445f5b4c3f5.tar.bz2
rockbox-c1ec1ec89962ded5ae4acefc33c6a445f5b4c3f5.tar.xz
rk27xx: Disable cache while invalidating it.
It seems something wrong with cache handling in rk27xx. OF always disable cache before invalidating cache ways, therefore, now we do the same. Hopefully this will fix cache handling, but I couldn't contend that it's really so. Change-Id: I967c18211f0ddff689b6a17579fbe8685277f132
-rw-r--r--firmware/target/arm/rk27xx/system-rk27xx.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/firmware/target/arm/rk27xx/system-rk27xx.c b/firmware/target/arm/rk27xx/system-rk27xx.c
index 2737320..8e6773f 100644
--- a/firmware/target/arm/rk27xx/system-rk27xx.c
+++ b/firmware/target/arm/rk27xx/system-rk27xx.c
@@ -218,11 +218,15 @@ static void __attribute__((noinline)) cache_invalidate_way(int way)
void commit_discard_idcache(void)
{
+ DEVID &= ~(1<<31); /* disable cache */
+
/* invalidate cache way 0 */
cache_invalidate_way(0);
/* invalidate cache way 1 */
cache_invalidate_way(1);
+
+ DEVID |= (1<<31); /* enable cache */
}
void commit_discard_dcache (void) __attribute__((alias("commit_discard_idcache")));