memoryOperation.h 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  1. #ifndef __ALPHA_T2__H__
  2. #define __ALPHA_T2__H__
  3. /* Fit everything into one 128MB HAE window. */
  4. #define T2_ONE_HAE_WINDOW 1
  5. #include <linux/types.h>
  6. #include <linux/spinlock.h>
  7. #include <asm/compiler.h>
  8. /*
  9. * T2 is the internal name for the core logic chipset which provides
  10. * memory controller and PCI access for the SABLE-based systems.
  11. *
  12. * This file is based on:
  13. *
  14. * SABLE I/O Specification
  15. * Revision/Update Information: 1.3
  16. *
  17. * jestabro@amt.tay1.dec.com Initial Version.
  18. *
  19. */
  20. #define T2_MEM_R1_MASK 0x07ffffff /* Mem sparse region 1 mask is 27 bits */
  21. /* GAMMA-SABLE is a SABLE with EV5-based CPUs */
  22. /* All LYNX machines, EV4 or EV5, use the GAMMA bias also */
  23. #define _GAMMA_BIAS 0x8000000000UL
  24. #if defined(CONFIG_ALPHA_GENERIC)
  25. #define GAMMA_BIAS alpha_mv.sys.t2.gamma_bias
  26. #elif defined(CONFIG_ALPHA_GAMMA)
  27. #define GAMMA_BIAS _GAMMA_BIAS
  28. #else
  29. #define GAMMA_BIAS 0
  30. #endif
  31. /*
  32. * Memory spaces:
  33. */
  34. #define T2_CONF (IDENT_ADDR + GAMMA_BIAS + 0x390000000UL)
  35. #define T2_IO (IDENT_ADDR + GAMMA_BIAS + 0x3a0000000UL)
  36. #define T2_SPARSE_MEM (IDENT_ADDR + GAMMA_BIAS + 0x200000000UL)
  37. #define T2_DENSE_MEM (IDENT_ADDR + GAMMA_BIAS + 0x3c0000000UL)
  38. #define T2_IOCSR (IDENT_ADDR + GAMMA_BIAS + 0x38e000000UL)
  39. #define T2_CERR1 (IDENT_ADDR + GAMMA_BIAS + 0x38e000020UL)
  40. #define T2_CERR2 (IDENT_ADDR + GAMMA_BIAS + 0x38e000040UL)
  41. #define T2_CERR3 (IDENT_ADDR + GAMMA_BIAS + 0x38e000060UL)
  42. #define T2_PERR1 (IDENT_ADDR + GAMMA_BIAS + 0x38e000080UL)
  43. #define T2_PERR2 (IDENT_ADDR + GAMMA_BIAS + 0x38e0000a0UL)
  44. #define T2_PSCR (IDENT_ADDR + GAMMA_BIAS + 0x38e0000c0UL)
  45. #define T2_HAE_1 (IDENT_ADDR + GAMMA_BIAS + 0x38e0000e0UL)
  46. #define T2_HAE_2 (IDENT_ADDR + GAMMA_BIAS + 0x38e000100UL)
  47. #define T2_HBASE (IDENT_ADDR + GAMMA_BIAS + 0x38e000120UL)
  48. #define T2_WBASE1 (IDENT_ADDR + GAMMA_BIAS + 0x38e000140UL)
  49. #define T2_WMASK1 (IDENT_ADDR + GAMMA_BIAS + 0x38e000160UL)
  50. #define T2_TBASE1 (IDENT_ADDR + GAMMA_BIAS + 0x38e000180UL)
  51. #define T2_WBASE2 (IDENT_ADDR + GAMMA_BIAS + 0x38e0001a0UL)
  52. #define T2_WMASK2 (IDENT_ADDR + GAMMA_BIAS + 0x38e0001c0UL)
  53. #define T2_TBASE2 (IDENT_ADDR + GAMMA_BIAS + 0x38e0001e0UL)
  54. #define T2_TLBBR (IDENT_ADDR + GAMMA_BIAS + 0x38e000200UL)
  55. #define T2_IVR (IDENT_ADDR + GAMMA_BIAS + 0x38e000220UL)
  56. #define T2_HAE_3 (IDENT_ADDR + GAMMA_BIAS + 0x38e000240UL)
  57. #define T2_HAE_4 (IDENT_ADDR + GAMMA_BIAS + 0x38e000260UL)
  58. /* The CSRs below are T3/T4 only */
  59. #define T2_WBASE3 (IDENT_ADDR + GAMMA_BIAS + 0x38e000280UL)
  60. #define T2_WMASK3 (IDENT_ADDR + GAMMA_BIAS + 0x38e0002a0UL)
  61. #define T2_TBASE3 (IDENT_ADDR + GAMMA_BIAS + 0x38e0002c0UL)
  62. #define T2_TDR0 (IDENT_ADDR + GAMMA_BIAS + 0x38e000300UL)
  63. #define T2_TDR1 (IDENT_ADDR + GAMMA_BIAS + 0x38e000320UL)
  64. #define T2_TDR2 (IDENT_ADDR + GAMMA_BIAS + 0x38e000340UL)
  65. #define T2_TDR3 (IDENT_ADDR + GAMMA_BIAS + 0x38e000360UL)
  66. #define T2_TDR4 (IDENT_ADDR + GAMMA_BIAS + 0x38e000380UL)
  67. #define T2_TDR5 (IDENT_ADDR + GAMMA_BIAS + 0x38e0003a0UL)
  68. #define T2_TDR6 (IDENT_ADDR + GAMMA_BIAS + 0x38e0003c0UL)
  69. #define T2_TDR7 (IDENT_ADDR + GAMMA_BIAS + 0x38e0003e0UL)
  70. #define T2_WBASE4 (IDENT_ADDR + GAMMA_BIAS + 0x38e000400UL)
  71. #define T2_WMASK4 (IDENT_ADDR + GAMMA_BIAS + 0x38e000420UL)
  72. #define T2_TBASE4 (IDENT_ADDR + GAMMA_BIAS + 0x38e000440UL)
  73. #define T2_AIR (IDENT_ADDR + GAMMA_BIAS + 0x38e000460UL)
  74. #define T2_VAR (IDENT_ADDR + GAMMA_BIAS + 0x38e000480UL)
  75. #define T2_DIR (IDENT_ADDR + GAMMA_BIAS + 0x38e0004a0UL)
  76. #define T2_ICE (IDENT_ADDR + GAMMA_BIAS + 0x38e0004c0UL)
  77. #ifndef T2_ONE_HAE_WINDOW
  78. #define T2_HAE_ADDRESS T2_HAE_1
  79. #endif
  80. /* T2 CSRs are in the non-cachable primary IO space from 3.8000.0000 to
  81. 3.8fff.ffff
  82. *
  83. * +--------------+ 3 8000 0000
  84. * | CPU 0 CSRs |
  85. * +--------------+ 3 8100 0000
  86. * | CPU 1 CSRs |
  87. * +--------------+ 3 8200 0000
  88. * | CPU 2 CSRs |
  89. * +--------------+ 3 8300 0000
  90. * | CPU 3 CSRs |
  91. * +--------------+ 3 8400 0000
  92. * | CPU Reserved |
  93. * +--------------+ 3 8700 0000
  94. * | Mem Reserved |
  95. * +--------------+ 3 8800 0000
  96. * | Mem 0 CSRs |
  97. * +--------------+ 3 8900 0000
  98. * | Mem 1 CSRs |
  99. * +--------------+ 3 8a00 0000
  100. * | Mem 2 CSRs |
  101. * +--------------+ 3 8b00 0000
  102. * | Mem 3 CSRs |
  103. * +--------------+ 3 8c00 0000
  104. * | Mem Reserved |
  105. * +--------------+ 3 8e00 0000
  106. * | PCI Bridge |
  107. * +--------------+ 3 8f00 0000
  108. * | Expansion IO |
  109. * +--------------+ 3 9000 0000