1
2
3
4
5
6
7
8
9
10
11
12
13 #ifndef _SGI_MC_H
14 #define _SGI_MC_H
15
16 struct sgimc_regs {
17 u32 _unused0;
18 volatile u32 cpuctrl0;
19 #define SGIMC_CCTRL0_REFS 0x0000000f
20 #define SGIMC_CCTRL0_EREFRESH 0x00000010
21 #define SGIMC_CCTRL0_EPERRGIO 0x00000020
22 #define SGIMC_CCTRL0_EPERRMEM 0x00000040
23 #define SGIMC_CCTRL0_EPERRCPU 0x00000080
24 #define SGIMC_CCTRL0_WDOG 0x00000100
25 #define SGIMC_CCTRL0_SYSINIT 0x00000200
26 #define SGIMC_CCTRL0_GFXRESET 0x00000400
27 #define SGIMC_CCTRL0_EISALOCK 0x00000800
28 #define SGIMC_CCTRL0_EPERRSCMD 0x00001000
29 #define SGIMC_CCTRL0_IENAB 0x00002000
30 #define SGIMC_CCTRL0_ESNOOP 0x00004000
31 #define SGIMC_CCTRL0_EPROMWR 0x00008000
32 #define SGIMC_CCTRL0_WRESETPMEM 0x00010000
33 #define SGIMC_CCTRL0_LENDIAN 0x00020000
34 #define SGIMC_CCTRL0_WRESETDMEM 0x00040000
35 #define SGIMC_CCTRL0_CMEMBADPAR 0x02000000
36 #define SGIMC_CCTRL0_R4KNOCHKPARR 0x04000000
37 #define SGIMC_CCTRL0_GIOBTOB 0x08000000
38 u32 _unused1;
39 volatile u32 cpuctrl1;
40 #define SGIMC_CCTRL1_EGIOTIMEO 0x00000010
41 #define SGIMC_CCTRL1_FIXEDEHPC 0x00001000
42 #define SGIMC_CCTRL1_LITTLEHPC 0x00002000
43 #define SGIMC_CCTRL1_FIXEDEEXP0 0x00004000
44 #define SGIMC_CCTRL1_LITTLEEXP0 0x00008000
45 #define SGIMC_CCTRL1_FIXEDEEXP1 0x00010000
46 #define SGIMC_CCTRL1_LITTLEEXP1 0x00020000
47
48 u32 _unused2;
49 volatile u32 watchdogt;
50
51 u32 _unused3;
52 volatile u32 systemid;
53 #define SGIMC_SYSID_MASKREV 0x0000000f
54 #define SGIMC_SYSID_EPRESENT 0x00000010
55
56 u32 _unused4[3];
57 volatile u32 divider;
58
59 u32 _unused5;
60 u32 eeprom;
61 #define SGIMC_EEPROM_PRE 0x00000001
62 #define SGIMC_EEPROM_CSEL 0x00000002
63 #define SGIMC_EEPROM_SECLOCK 0x00000004
64 #define SGIMC_EEPROM_SDATAO 0x00000008
65 #define SGIMC_EEPROM_SDATAI 0x00000010
66
67 u32 _unused6[3];
68 volatile u32 rcntpre;
69
70 u32 _unused7;
71 volatile u32 rcounter;
72
73 u32 _unused8[13];
74 volatile u32 giopar;
75 #define SGIMC_GIOPAR_HPC64 0x00000001
76 #define SGIMC_GIOPAR_GFX64 0x00000002
77 #define SGIMC_GIOPAR_EXP064 0x00000004
78 #define SGIMC_GIOPAR_EXP164 0x00000008
79 #define SGIMC_GIOPAR_EISA64 0x00000010
80 #define SGIMC_GIOPAR_HPC264 0x00000020
81 #define SGIMC_GIOPAR_RTIMEGFX 0x00000040
82 #define SGIMC_GIOPAR_RTIMEEXP0 0x00000080
83 #define SGIMC_GIOPAR_RTIMEEXP1 0x00000100
84 #define SGIMC_GIOPAR_MASTEREISA 0x00000200
85 #define SGIMC_GIOPAR_ONEBUS 0x00000400
86 #define SGIMC_GIOPAR_MASTERGFX 0x00000800
87 #define SGIMC_GIOPAR_MASTEREXP0 0x00001000
88 #define SGIMC_GIOPAR_MASTEREXP1 0x00002000
89 #define SGIMC_GIOPAR_PLINEEXP0 0x00004000
90 #define SGIMC_GIOPAR_PLINEEXP1 0x00008000
91
92 u32 _unused9;
93 volatile u32 cputp;
94
95 u32 _unused10[3];
96 volatile u32 lbursttp;
97
98
99
100 u32 _unused11[9];
101 volatile u32 mconfig0;
102 u32 _unused12;
103 volatile u32 mconfig1;
104 #define SGIMC_MCONFIG_BASEADDR 0x000000ff
105 #define SGIMC_MCONFIG_RMASK 0x00001f00
106 #define SGIMC_MCONFIG_BVALID 0x00002000
107 #define SGIMC_MCONFIG_SBANKS 0x00004000
108
109 u32 _unused13;
110 volatile u32 cmacc;
111 u32 _unused14;
112 volatile u32 gmacc;
113
114
115 #define SGIMC_MACC_ALIASBIG 0x20000000
116
117
118 u32 _unused15;
119 volatile u32 cerr;
120 u32 _unused16;
121 volatile u32 cstat;
122 #define SGIMC_CSTAT_RD 0x00000100
123 #define SGIMC_CSTAT_PAR 0x00000200
124 #define SGIMC_CSTAT_ADDR 0x00000400
125 #define SGIMC_CSTAT_SYSAD_PAR 0x00000800
126 #define SGIMC_CSTAT_SYSCMD_PAR 0x00001000
127 #define SGIMC_CSTAT_BAD_DATA 0x00002000
128 #define SGIMC_CSTAT_PAR_MASK 0x00001f00
129 #define SGIMC_CSTAT_RD_PAR (SGIMC_CSTAT_RD | SGIMC_CSTAT_PAR)
130
131 u32 _unused17;
132 volatile u32 gerr;
133 u32 _unused18;
134 volatile u32 gstat;
135 #define SGIMC_GSTAT_RD 0x00000100
136 #define SGIMC_GSTAT_WR 0x00000200
137 #define SGIMC_GSTAT_TIME 0x00000400
138 #define SGIMC_GSTAT_PROM 0x00000800
139 #define SGIMC_GSTAT_ADDR 0x00001000
140 #define SGIMC_GSTAT_BC 0x00002000
141 #define SGIMC_GSTAT_PIO_RD 0x00004000
142 #define SGIMC_GSTAT_PIO_WR 0x00008000
143
144
145 u32 _unused19;
146 volatile u32 syssembit;
147 u32 _unused20;
148 volatile u32 mlock;
149 u32 _unused21;
150 volatile u32 elock;
151
152
153 u32 _unused22[15];
154 volatile u32 gio_dma_trans;
155 u32 _unused23;
156 volatile u32 gio_dma_sbits;
157 u32 _unused24;
158 volatile u32 dma_intr_cause;
159 u32 _unused25;
160 volatile u32 dma_ctrl;
161
162
163 u32 _unused26[5];
164 volatile u32 dtlb_hi0;
165 u32 _unused27;
166 volatile u32 dtlb_lo0;
167
168
169 u32 _unused28;
170 volatile u32 dtlb_hi1;
171 u32 _unused29;
172 volatile u32 dtlb_lo1;
173
174
175 u32 _unused30;
176 volatile u32 dtlb_hi2;
177 u32 _unused31;
178 volatile u32 dtlb_lo2;
179
180
181 u32 _unused32;
182 volatile u32 dtlb_hi3;
183 u32 _unused33;
184 volatile u32 dtlb_lo3;
185
186 u32 _unused34[0x0392];
187
188 u32 _unused35;
189 volatile u32 rpsscounter;
190
191 u32 _unused36[0x1000/4-2*4];
192
193 u32 _unused37;
194 volatile u32 maddronly;
195 u32 _unused38;
196 volatile u32 maddrpdeflts;
197 u32 _unused39;
198 volatile u32 dmasz;
199 u32 _unused40;
200 volatile u32 ssize;
201 u32 _unused41;
202 volatile u32 gmaddronly;
203 u32 _unused42;
204 volatile u32 dmaddnpgo;
205 u32 _unused43;
206 volatile u32 dmamode;
207 u32 _unused44;
208 volatile u32 dmaccount;
209 u32 _unused45;
210 volatile u32 dmastart;
211 u32 _unused46;
212 volatile u32 dmarunning;
213 u32 _unused47;
214 volatile u32 maddrdefstart;
215 };
216
217 extern struct sgimc_regs *sgimc;
218 #define SGIMC_BASE 0x1fa00000
219
220
221 #define SGIMC_SEG0_BADDR 0x08000000
222 #define SGIMC_SEG1_BADDR 0x20000000
223
224
225 #define SGIMC_SEG0_SIZE_ALL 0x10000000
226 #define SGIMC_SEG1_SIZE_IP20_IP22 0x08000000
227 #define SGIMC_SEG1_SIZE_IP26_IP28 0x20000000
228
229 extern void sgimc_init(void);
230
231 #endif