diff --git a/firmware/target/arm/rk27xx/system-rk27xx.c b/firmware/target/arm/rk27xx/system-rk27xx.c index 27373207bd..8e6773f816 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")));