cache.h 886 B

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