cache.h 886 B

123456789101112131415161718192021222324252627282930313233
  1. /*
  2. * Copyright (c) 2011 The Chromium OS Authors.
  3. *
  4. * SPDX-License-Identifier: GPL-2.0+
  5. */
  6. #ifndef __MIPS_CACHE_H__
  7. #define __MIPS_CACHE_H__
  8. #define L1_CACHE_SHIFT CONFIG_MIPS_L1_CACHE_SHIFT
  9. #define L1_CACHE_BYTES (1 << L1_CACHE_SHIFT)
  10. #define ARCH_DMA_MINALIGN (L1_CACHE_BYTES)
  11. /*
  12. * CONFIG_SYS_CACHELINE_SIZE is still used in various drivers primarily for
  13. * DMA buffer alignment. Satisfy those drivers by providing it as a synonym
  14. * of ARCH_DMA_MINALIGN for now.
  15. */
  16. #define CONFIG_SYS_CACHELINE_SIZE ARCH_DMA_MINALIGN
  17. #ifndef __ASSEMBLY__
  18. /**
  19. * mips_cache_probe() - Probe the properties of the caches
  20. *
  21. * Call this to probe the properties such as line sizes of the caches
  22. * present in the system, if any. This must be done before cache maintenance
  23. * functions such as flush_cache may be called.
  24. */
  25. void mips_cache_probe(void);
  26. #endif
  27. #endif /* __MIPS_CACHE_H__ */