cache.h 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. /*
  2. * Cache operations
  3. *
  4. * Copyright (C) 2007-2009 Michal Simek <monstr@monstr.eu>
  5. * Copyright (C) 2007-2009 PetaLogix
  6. * Copyright (C) 2003 John Williams <jwilliams@itee.uq.edu.au>
  7. *
  8. * This file is subject to the terms and conditions of the GNU General
  9. * Public License. See the file COPYING in the main directory of this
  10. * archive for more details.
  11. */
  12. #ifndef _ASM_MICROBLAZE_CACHE_H
  13. #define _ASM_MICROBLAZE_CACHE_H
  14. #include <asm/registers.h>
  15. #define L1_CACHE_SHIFT 2
  16. /* word-granular cache in microblaze */
  17. #define L1_CACHE_BYTES (1 << L1_CACHE_SHIFT)
  18. #define SMP_CACHE_BYTES L1_CACHE_BYTES
  19. void _enable_icache(void);
  20. void _disable_icache(void);
  21. void _invalidate_icache(unsigned int addr);
  22. #define __enable_icache() _enable_icache()
  23. #define __disable_icache() _disable_icache()
  24. #define __invalidate_icache(addr) _invalidate_icache(addr)
  25. void _enable_dcache(void);
  26. void _disable_dcache(void);
  27. void _invalidate_dcache(unsigned int addr);
  28. #define __enable_dcache() _enable_dcache()
  29. #define __disable_dcache() _disable_dcache()
  30. #define __invalidate_dcache(addr) _invalidate_dcache(addr)
  31. /* FIXME - I don't think this is right */
  32. #ifdef CONFIG_XILINX_UNCACHED_SHADOW
  33. #define UNCACHED_SHADOW_MASK (CONFIG_XILINX_ERAM_SIZE)
  34. #endif
  35. #endif /* _ASM_MICROBLAZE_CACHE_H */