cache.h 640 B

12345678910111213141516171819202122232425262728293031
  1. #ifndef __ASM_SH_CACHE_H
  2. #define __ASM_SH_CACHE_H
  3. #if defined(CONFIG_CPU_SH4)
  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. #else
  9. /*
  10. * 32-bytes is the largest L1 data cache line size for SH the architecture. So
  11. * it is a safe default for DMA alignment.
  12. */
  13. #define ARCH_DMA_MINALIGN 32
  14. #endif /* CONFIG_CPU_SH4 */
  15. /*
  16. * Use the L1 data cache line size value for the minimum DMA buffer alignment
  17. * on SH.
  18. */
  19. #ifndef ARCH_DMA_MINALIGN
  20. #define ARCH_DMA_MINALIGN L1_CACHE_BYTES
  21. #endif
  22. #endif /* __ASM_SH_CACHE_H */