cache.h 764 B

12345678910111213141516171819202122232425262728293031323334
  1. #ifndef __ASM_SH_CACHE_H
  2. #define __ASM_SH_CACHE_H
  3. #if defined(CONFIG_SH4) || defined(CONFIG_SH4A)
  4. int cache_control(unsigned int cmd);
  5. #define L1_CACHE_BYTES 32
  6. struct __large_struct { unsigned long buf[100]; };
  7. #define __m(x) (*(struct __large_struct *)(x))
  8. void dcache_wback_range(u32 start, u32 end);
  9. void dcache_invalid_range(u32 start, u32 end);
  10. #else
  11. /*
  12. * 32-bytes is the largest L1 data cache line size for SH the architecture. So
  13. * it is a safe default for DMA alignment.
  14. */
  15. #define ARCH_DMA_MINALIGN 32
  16. #endif /* CONFIG_SH4 || CONFIG_SH4A */
  17. /*
  18. * Use the L1 data cache line size value for the minimum DMA buffer alignment
  19. * on SH.
  20. */
  21. #ifndef ARCH_DMA_MINALIGN
  22. #define ARCH_DMA_MINALIGN L1_CACHE_BYTES
  23. #endif
  24. #endif /* __ASM_SH_CACHE_H */