memoryCall.h 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159
  1. #ifndef __ALPHA_TITAN__H__
  2. #define __ALPHA_TITAN__H__
  3. #include <linux/types.h>
  4. #include <asm/compiler.h>
  5. /*
  6. * TITAN is the internal names for a core logic chipset which provides
  7. * memory controller and PCI/AGP access for 21264 based systems.
  8. *
  9. * This file is based on:
  10. *
  11. * Titan Chipset Engineering Specification
  12. * Revision 0.12
  13. * 13 July 1999
  14. *
  15. */
  16. /* XXX: Do we need to conditionalize on this? */
  17. #ifdef USE_48_BIT_KSEG
  18. #define TI_BIAS 0x80000000000UL
  19. #else
  20. #define TI_BIAS 0x10000000000UL
  21. #endif
  22. /*
  23. * CChip, DChip, and PChip registers
  24. */
  25. typedef struct {
  26. volatile unsigned long csr __attribute__((aligned(64)));
  27. } titan_64;
  28. typedef struct {
  29. titan_64 csc;
  30. titan_64 mtr;
  31. titan_64 misc;
  32. titan_64 mpd;
  33. titan_64 aar0;
  34. titan_64 aar1;
  35. titan_64 aar2;
  36. titan_64 aar3;
  37. titan_64 dim0;
  38. titan_64 dim1;
  39. titan_64 dir0;
  40. titan_64 dir1;
  41. titan_64 drir;
  42. titan_64 prben;
  43. titan_64 iic0;
  44. titan_64 iic1;
  45. titan_64 mpr0;
  46. titan_64 mpr1;
  47. titan_64 mpr2;
  48. titan_64 mpr3;
  49. titan_64 rsvd[2];
  50. titan_64 ttr;
  51. titan_64 tdr;
  52. titan_64 dim2;
  53. titan_64 dim3;
  54. titan_64 dir2;
  55. titan_64 dir3;
  56. titan_64 iic2;
  57. titan_64 iic3;
  58. titan_64 pwr;
  59. titan_64 reserved[17];
  60. titan_64 cmonctla;
  61. titan_64 cmonctlb;
  62. titan_64 cmoncnt01;
  63. titan_64 cmoncnt23;
  64. titan_64 cpen;
  65. } titan_cchip;
  66. typedef struct {
  67. titan_64 dsc;
  68. titan_64 str;
  69. titan_64 drev;
  70. titan_64 dsc2;
  71. } titan_dchip;
  72. typedef struct {
  73. titan_64 wsba[4];
  74. titan_64 wsm[4];
  75. titan_64 tba[4];
  76. titan_64 pctl;
  77. titan_64 plat;
  78. titan_64 reserved0[2];
  79. union {
  80. struct {
  81. titan_64 serror;
  82. titan_64 serren;
  83. titan_64 serrset;
  84. titan_64 reserved0;
  85. titan_64 gperror;
  86. titan_64 gperren;
  87. titan_64 gperrset;
  88. titan_64 reserved1;
  89. titan_64 gtlbiv;
  90. titan_64 gtlbia;
  91. titan_64 reserved2[2];
  92. titan_64 sctl;
  93. titan_64 reserved3[3];
  94. } g;
  95. struct {
  96. titan_64 agperror;
  97. titan_64 agperren;
  98. titan_64 agperrset;
  99. titan_64 agplastwr;
  100. titan_64 aperror;
  101. titan_64 aperren;
  102. titan_64 aperrset;
  103. titan_64 reserved0;
  104. titan_64 atlbiv;
  105. titan_64 atlbia;
  106. titan_64 reserved1[6];
  107. } a;
  108. } port_specific;
  109. titan_64 sprst;
  110. titan_64 reserved1[31];
  111. } titan_pachip_port;
  112. typedef struct {
  113. titan_pachip_port g_port;
  114. titan_pachip_port a_port;
  115. } titan_pachip;
  116. #define TITAN_cchip ((titan_cchip *)(IDENT_ADDR+TI_BIAS+0x1A0000000UL))
  117. #define TITAN_dchip ((titan_dchip *)(IDENT_ADDR+TI_BIAS+0x1B0000800UL))
  118. #define TITAN_pachip0 ((titan_pachip *)(IDENT_ADDR+TI_BIAS+0x180000000UL))
  119. #define TITAN_pachip1 ((titan_pachip *)(IDENT_ADDR+TI_BIAS+0x380000000UL))
  120. extern unsigned TITAN_agp;
  121. extern int TITAN_bootcpu;
  122. /*
  123. * TITAN PA-chip Window Space Base Address register.
  124. * (WSBA[0-2])
  125. */
  126. #define wsba_m_ena 0x1
  127. #define wsba_m_sg 0x2
  128. #define wsba_m_addr 0xFFF00000
  129. #define wmask_k_sz1gb 0x3FF00000
  130. union TPAchipWSBA {
  131. struct {
  132. unsigned wsba_v_ena : 1;
  133. unsigned wsba_v_sg : 1;
  134. unsigned wsba_v_rsvd1 : 18;
  135. unsigned wsba_v_addr : 12;
  136. unsigned wsba_v_rsvd2 : 32;
  137. } wsba_r_bits;
  138. int wsba_q_whole [2];
  139. };
  140. /*
  141. * TITAN PA-chip Control Register
  142. * This definition covers both the G-Port GPCTL and the A-PORT APCTL.
  143. * Bits <51:0> are the same in both cases. APCTL<63:52> are only
  144. * applicable to AGP.
  145. */
  146. #define pctl_m_fbtb 0x00000001
  147. #define pctl_m_thdis 0x00000002