Pastebin launched a little side project called HostCabi.net, check it out ;-)Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Sep 19th, 2012  |  syntax: None  |  size: 0.95 KB  |  hits: 32  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  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")));