Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Sep 19th, 2012  |  syntax: C  |  size: 0.51 KB  |  views: 26  |  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. static void __attribute__((aligned(32),noinline)) invalidate_way0(void)
  2. {
  3.         /* invalidate cache way 0 */
  4.     CACHEOP = 0x02;
  5.  
  6.     /* wait for invalidate process to complete */
  7.     while (CACHEOP & 0x03);  
  8. }
  9.  
  10. static void __attribute__ ((aligned(32),noinline)) invalidate_way1(void)
  11. {
  12.         /* invalidate cache way 1 */
  13.     CACHEOP = 0x80000002;
  14.  
  15.     /* wait for invalidate process to complete */
  16.     while (CACHEOP & 0x03);  
  17. }
  18.  
  19.  
  20. void commit_discard_idcache(void)
  21. {
  22.         invalidate_way0();
  23.         invalidate_way1();
  24. }
clone this paste RAW Paste Data