cache.h 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. /*
  2. * include/asm-sh/cpu-sh2/cache.h
  3. *
  4. * Copyright (C) 2003 Paul Mundt
  5. *
  6. * This file is subject to the terms and conditions of the GNU General Public
  7. * License. See the file "COPYING" in the main directory of this archive
  8. * for more details.
  9. */
  10. #ifndef __ASM_CPU_SH2_CACHE_H
  11. #define __ASM_CPU_SH2_CACHE_H
  12. #define L1_CACHE_SHIFT 4
  13. #if defined(CONFIG_CPU_SUBTYPE_SH7604)
  14. #define CCR 0xfffffe92 /* Address of Cache Control Register */
  15. #define CCR_CACHE_CE 0x01 /* Cache enable */
  16. #define CCR_CACHE_ID 0x02 /* Instruction Replacement disable */
  17. #define CCR_CACHE_OD 0x04 /* Data Replacement disable */
  18. #define CCR_CACHE_TW 0x08 /* Two-way mode */
  19. #define CCR_CACHE_CP 0x10 /* Cache purge */
  20. #define CACHE_OC_ADDRESS_ARRAY 0x60000000
  21. #define CCR_CACHE_ENABLE CCR_CACHE_CE
  22. #define CCR_CACHE_INVALIDATE CCR_CACHE_CP
  23. #define CCR_CACHE_ORA CCR_CACHE_TW
  24. #define CCR_CACHE_WT 0x00 /* SH-2 is _always_ write-through */
  25. #elif defined(CONFIG_CPU_SUBTYPE_SH7619)
  26. #define CCR1 0xffffffec
  27. #define CCR CCR1
  28. #define CCR_CACHE_CE 0x01 /* Cache enable */
  29. #define CCR_CACHE_WT 0x06 /* CCR[bit1=1,bit2=1] */
  30. /* 0x00000000-0x7fffffff: Write-through */
  31. /* 0x80000000-0x9fffffff: Write-back */
  32. /* 0xc0000000-0xdfffffff: Write-through */
  33. #define CCR_CACHE_CB 0x00 /* CCR[bit1=0,bit2=0] */
  34. /* 0x00000000-0x7fffffff: Write-back */
  35. /* 0x80000000-0x9fffffff: Write-through */
  36. /* 0xc0000000-0xdfffffff: Write-back */
  37. #define CCR_CACHE_CF 0x08 /* Cache invalidate */
  38. #define CACHE_OC_ADDRESS_ARRAY 0xf0000000
  39. #define CACHE_OC_DATA_ARRAY 0xf1000000
  40. #define CCR_CACHE_ENABLE CCR_CACHE_CE
  41. #define CCR_CACHE_INVALIDATE CCR_CACHE_CF
  42. #endif
  43. #endif /* __ASM_CPU_SH2_CACHE_H */