0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013 #ifndef _SGI_MC_H
0014 #define _SGI_MC_H
0015
0016 struct sgimc_regs {
0017 u32 _unused0;
0018 volatile u32 cpuctrl0;
0019 #define SGIMC_CCTRL0_REFS 0x0000000f
0020 #define SGIMC_CCTRL0_EREFRESH 0x00000010
0021 #define SGIMC_CCTRL0_EPERRGIO 0x00000020
0022 #define SGIMC_CCTRL0_EPERRMEM 0x00000040
0023 #define SGIMC_CCTRL0_EPERRCPU 0x00000080
0024 #define SGIMC_CCTRL0_WDOG 0x00000100
0025 #define SGIMC_CCTRL0_SYSINIT 0x00000200
0026 #define SGIMC_CCTRL0_GFXRESET 0x00000400
0027 #define SGIMC_CCTRL0_EISALOCK 0x00000800
0028 #define SGIMC_CCTRL0_EPERRSCMD 0x00001000
0029 #define SGIMC_CCTRL0_IENAB 0x00002000
0030 #define SGIMC_CCTRL0_ESNOOP 0x00004000
0031 #define SGIMC_CCTRL0_EPROMWR 0x00008000
0032 #define SGIMC_CCTRL0_WRESETPMEM 0x00010000
0033 #define SGIMC_CCTRL0_LENDIAN 0x00020000
0034 #define SGIMC_CCTRL0_WRESETDMEM 0x00040000
0035 #define SGIMC_CCTRL0_CMEMBADPAR 0x02000000
0036 #define SGIMC_CCTRL0_R4KNOCHKPARR 0x04000000
0037 #define SGIMC_CCTRL0_GIOBTOB 0x08000000
0038 u32 _unused1;
0039 volatile u32 cpuctrl1;
0040 #define SGIMC_CCTRL1_EGIOTIMEO 0x00000010
0041 #define SGIMC_CCTRL1_FIXEDEHPC 0x00001000
0042 #define SGIMC_CCTRL1_LITTLEHPC 0x00002000
0043 #define SGIMC_CCTRL1_FIXEDEEXP0 0x00004000
0044 #define SGIMC_CCTRL1_LITTLEEXP0 0x00008000
0045 #define SGIMC_CCTRL1_FIXEDEEXP1 0x00010000
0046 #define SGIMC_CCTRL1_LITTLEEXP1 0x00020000
0047
0048 u32 _unused2;
0049 volatile u32 watchdogt;
0050
0051 u32 _unused3;
0052 volatile u32 systemid;
0053 #define SGIMC_SYSID_MASKREV 0x0000000f
0054 #define SGIMC_SYSID_EPRESENT 0x00000010
0055
0056 u32 _unused4[3];
0057 volatile u32 divider;
0058
0059 u32 _unused5;
0060 u32 eeprom;
0061 #define SGIMC_EEPROM_PRE 0x00000001
0062 #define SGIMC_EEPROM_CSEL 0x00000002
0063 #define SGIMC_EEPROM_SECLOCK 0x00000004
0064 #define SGIMC_EEPROM_SDATAO 0x00000008
0065 #define SGIMC_EEPROM_SDATAI 0x00000010
0066
0067 u32 _unused6[3];
0068 volatile u32 rcntpre;
0069
0070 u32 _unused7;
0071 volatile u32 rcounter;
0072
0073 u32 _unused8[13];
0074 volatile u32 giopar;
0075 #define SGIMC_GIOPAR_HPC64 0x00000001
0076 #define SGIMC_GIOPAR_GFX64 0x00000002
0077 #define SGIMC_GIOPAR_EXP064 0x00000004
0078 #define SGIMC_GIOPAR_EXP164 0x00000008
0079 #define SGIMC_GIOPAR_EISA64 0x00000010
0080 #define SGIMC_GIOPAR_HPC264 0x00000020
0081 #define SGIMC_GIOPAR_RTIMEGFX 0x00000040
0082 #define SGIMC_GIOPAR_RTIMEEXP0 0x00000080
0083 #define SGIMC_GIOPAR_RTIMEEXP1 0x00000100
0084 #define SGIMC_GIOPAR_MASTEREISA 0x00000200
0085 #define SGIMC_GIOPAR_ONEBUS 0x00000400
0086 #define SGIMC_GIOPAR_MASTERGFX 0x00000800
0087 #define SGIMC_GIOPAR_MASTEREXP0 0x00001000
0088 #define SGIMC_GIOPAR_MASTEREXP1 0x00002000
0089 #define SGIMC_GIOPAR_PLINEEXP0 0x00004000
0090 #define SGIMC_GIOPAR_PLINEEXP1 0x00008000
0091
0092 u32 _unused9;
0093 volatile u32 cputp;
0094
0095 u32 _unused10[3];
0096 volatile u32 lbursttp;
0097
0098
0099
0100 u32 _unused11[9];
0101 volatile u32 mconfig0;
0102 u32 _unused12;
0103 volatile u32 mconfig1;
0104 #define SGIMC_MCONFIG_BASEADDR 0x000000ff
0105 #define SGIMC_MCONFIG_RMASK 0x00001f00
0106 #define SGIMC_MCONFIG_BVALID 0x00002000
0107 #define SGIMC_MCONFIG_SBANKS 0x00004000
0108
0109 u32 _unused13;
0110 volatile u32 cmacc;
0111 u32 _unused14;
0112 volatile u32 gmacc;
0113
0114
0115 #define SGIMC_MACC_ALIASBIG 0x20000000
0116
0117
0118 u32 _unused15;
0119 volatile u32 cerr;
0120 u32 _unused16;
0121 volatile u32 cstat;
0122 #define SGIMC_CSTAT_RD 0x00000100
0123 #define SGIMC_CSTAT_PAR 0x00000200
0124 #define SGIMC_CSTAT_ADDR 0x00000400
0125 #define SGIMC_CSTAT_SYSAD_PAR 0x00000800
0126 #define SGIMC_CSTAT_SYSCMD_PAR 0x00001000
0127 #define SGIMC_CSTAT_BAD_DATA 0x00002000
0128 #define SGIMC_CSTAT_PAR_MASK 0x00001f00
0129 #define SGIMC_CSTAT_RD_PAR (SGIMC_CSTAT_RD | SGIMC_CSTAT_PAR)
0130
0131 u32 _unused17;
0132 volatile u32 gerr;
0133 u32 _unused18;
0134 volatile u32 gstat;
0135 #define SGIMC_GSTAT_RD 0x00000100
0136 #define SGIMC_GSTAT_WR 0x00000200
0137 #define SGIMC_GSTAT_TIME 0x00000400
0138 #define SGIMC_GSTAT_PROM 0x00000800
0139 #define SGIMC_GSTAT_ADDR 0x00001000
0140 #define SGIMC_GSTAT_BC 0x00002000
0141 #define SGIMC_GSTAT_PIO_RD 0x00004000
0142 #define SGIMC_GSTAT_PIO_WR 0x00008000
0143
0144
0145 u32 _unused19;
0146 volatile u32 syssembit;
0147 u32 _unused20;
0148 volatile u32 mlock;
0149 u32 _unused21;
0150 volatile u32 elock;
0151
0152
0153 u32 _unused22[15];
0154 volatile u32 gio_dma_trans;
0155 u32 _unused23;
0156 volatile u32 gio_dma_sbits;
0157 u32 _unused24;
0158 volatile u32 dma_intr_cause;
0159 u32 _unused25;
0160 volatile u32 dma_ctrl;
0161
0162
0163 u32 _unused26[5];
0164 volatile u32 dtlb_hi0;
0165 u32 _unused27;
0166 volatile u32 dtlb_lo0;
0167
0168
0169 u32 _unused28;
0170 volatile u32 dtlb_hi1;
0171 u32 _unused29;
0172 volatile u32 dtlb_lo1;
0173
0174
0175 u32 _unused30;
0176 volatile u32 dtlb_hi2;
0177 u32 _unused31;
0178 volatile u32 dtlb_lo2;
0179
0180
0181 u32 _unused32;
0182 volatile u32 dtlb_hi3;
0183 u32 _unused33;
0184 volatile u32 dtlb_lo3;
0185
0186 u32 _unused34[0x0392];
0187
0188 u32 _unused35;
0189 volatile u32 rpsscounter;
0190
0191 u32 _unused36[0x1000/4-2*4];
0192
0193 u32 _unused37;
0194 volatile u32 maddronly;
0195 u32 _unused38;
0196 volatile u32 maddrpdeflts;
0197 u32 _unused39;
0198 volatile u32 dmasz;
0199 u32 _unused40;
0200 volatile u32 ssize;
0201 u32 _unused41;
0202 volatile u32 gmaddronly;
0203 u32 _unused42;
0204 volatile u32 dmaddnpgo;
0205 u32 _unused43;
0206 volatile u32 dmamode;
0207 u32 _unused44;
0208 volatile u32 dmaccount;
0209 u32 _unused45;
0210 volatile u32 dmastart;
0211 u32 _unused46;
0212 volatile u32 dmarunning;
0213 u32 _unused47;
0214 volatile u32 maddrdefstart;
0215 };
0216
0217 extern struct sgimc_regs *sgimc;
0218 #define SGIMC_BASE 0x1fa00000
0219
0220
0221 #define SGIMC_SEG0_BADDR 0x08000000
0222 #define SGIMC_SEG1_BADDR 0x20000000
0223
0224
0225 #define SGIMC_SEG0_SIZE_ALL 0x10000000
0226 #define SGIMC_SEG1_SIZE_IP20_IP22 0x08000000
0227 #define SGIMC_SEG1_SIZE_IP26_IP28 0x20000000
0228
0229 extern void sgimc_init(void);
0230
0231 #endif