SHARE
TWEET

Untitled

a guest Oct 24th, 2012 49 Never
  1. void commit_discard_idcache(void)
  2. {
  3.     DEVID &= ~(1<<31);
  4.     /* invalidate cache way 0 */
  5.     cache_invalidate_way(0);
  6.  
  7.     /* invalidate cache way 1 */
  8.     cache_invalidate_way(1);
  9.     DEVID |= 1<<31;
  10. }
  11.  
  12. void commit_discard_idcache(void)
  13. {
  14.     asm volatile ("nop \n nop \n");
  15.     asm volatile ("nop \n nop \n");
  16.     /* invalidate cache way 0 */
  17.     cache_invalidate_way(0);
  18.  
  19.     /* invalidate cache way 1 */
  20.     cache_invalidate_way(1);
  21.     asm volatile ("nop \n nop \n");
  22.     asm volatile ("nop \n nop \n");
  23. }
RAW Paste Data
Top