cache.h 641 B

1234567891011121314151617181920212223242526272829
  1. #ifndef __ASM_AVR32_CACHE_H
  2. #define __ASM_AVR32_CACHE_H
  3. #define L1_CACHE_SHIFT 5
  4. #define L1_CACHE_BYTES (1 << L1_CACHE_SHIFT)
  5. #ifndef __ASSEMBLER__
  6. struct cache_info {
  7. unsigned int ways;
  8. unsigned int sets;
  9. unsigned int linesz;
  10. };
  11. #endif /* __ASSEMBLER */
  12. /* Cache operation constants */
  13. #define ICACHE_FLUSH 0x00
  14. #define ICACHE_INVALIDATE 0x01
  15. #define ICACHE_LOCK 0x02
  16. #define ICACHE_UNLOCK 0x03
  17. #define ICACHE_PREFETCH 0x04
  18. #define DCACHE_FLUSH 0x08
  19. #define DCACHE_LOCK 0x09
  20. #define DCACHE_UNLOCK 0x0a
  21. #define DCACHE_INVALIDATE 0x0b
  22. #define DCACHE_CLEAN 0x0c
  23. #define DCACHE_CLEAN_INVAL 0x0d
  24. #endif /* __ASM_AVR32_CACHE_H */