Advertisement
Guest User

Untitled

a guest
Sep 19th, 2012
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.95 KB | None | 0 0
  1. diff --git a/firmware/target/arm/rk27xx/system-rk27xx.c b/firmware/target/arm/rk27xx/system-rk27xx.c
  2. index 8c75dee..234c6eb 100644
  3. --- a/firmware/target/arm/rk27xx/system-rk27xx.c
  4. +++ b/firmware/target/arm/rk27xx/system-rk27xx.c
  5. @@ -200,19 +200,20 @@ void udelay(unsigned usecs)
  6. );
  7. }
  8.  
  9. -void commit_discard_idcache(void)
  10. +static void __attribute__((noinline)) cache_invalidate_way(int way)
  11. {
  12. - /* invalidate cache way 0 */
  13. - CACHEOP = 0x02;
  14. + CACHEOP = ((way<<31)|0x2);
  15.  
  16. /* wait for invalidate process to complete */
  17. while (CACHEOP & 0x03);
  18. +}
  19.  
  20. +void commit_discard_idcache(void)
  21. +{
  22. + /* invalidate cache way 0 */
  23. + cache_invalidate_way(0);
  24. /* invalidate cache way 1 */
  25. - CACHEOP = 0x80000002;
  26. -
  27. - /* wait for invalidate process to complete */
  28. - while (CACHEOP & 0x03);
  29. + cache_invalidate_way(1);
  30. }
  31. void commit_discard_dcache (void) __attribute__((alias("commit_discard_idcache")));
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement