v850e_cache.h 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. /*
  2. * include/asm-v850/v850e_cache.h -- Cache control for V850E cache memories
  3. *
  4. * Copyright (C) 2001,03 NEC Electronics Corporation
  5. * Copyright (C) 2001,03 Miles Bader <miles@gnu.org>
  6. *
  7. * This file is subject to the terms and conditions of the GNU General
  8. * Public License. See the file COPYING in the main directory of this
  9. * archive for more details.
  10. *
  11. * Written by Miles Bader <miles@gnu.org>
  12. */
  13. /* This file implements cache control for the rather simple cache used on
  14. some V850E CPUs, specifically the NB85E/TEG CPU-core and the V850E/ME2
  15. CPU. V850E2 processors have their own (better) cache
  16. implementation. */
  17. #ifndef __V850_V850E_CACHE_H__
  18. #define __V850_V850E_CACHE_H__
  19. #include <asm/types.h>
  20. /* Cache control registers. */
  21. #define V850E_CACHE_BHC_ADDR 0xFFFFF06A
  22. #define V850E_CACHE_BHC (*(volatile u16 *)V850E_CACHE_BHC_ADDR)
  23. #define V850E_CACHE_ICC_ADDR 0xFFFFF070
  24. #define V850E_CACHE_ICC (*(volatile u16 *)V850E_CACHE_ICC_ADDR)
  25. #define V850E_CACHE_ISI_ADDR 0xFFFFF072
  26. #define V850E_CACHE_ISI (*(volatile u16 *)V850E_CACHE_ISI_ADDR)
  27. #define V850E_CACHE_DCC_ADDR 0xFFFFF078
  28. #define V850E_CACHE_DCC (*(volatile u16 *)V850E_CACHE_DCC_ADDR)
  29. /* Size of a cache line in bytes. */
  30. #define V850E_CACHE_LINE_SIZE 16
  31. /* For <asm/cache.h> */
  32. #define L1_CACHE_BYTES V850E_CACHE_LINE_SIZE
  33. #if defined(__KERNEL__) && !defined(__ASSEMBLY__)
  34. /* Set caching params via the BHC, ICC, and DCC registers. */
  35. void v850e_cache_enable (u16 bhc, u16 icc, u16 dcc);
  36. #endif /* __KERNEL__ && !__ASSEMBLY__ */
  37. #endif /* __V850_V850E_CACHE_H__ */